Stopping gearman workers nicely

后端 未结 12 861
滥情空心
滥情空心 2021-01-30 04:24

I have a number of Gearman workers running constantly, saving things like records of user page views, etc. Occasionally, I\'ll update the PHP code that is used by the Gearman w

12条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 04:57

    If someone were looking for answer for a worker running perl, that's part of what the GearmanX::Starter library is for. You can stop workers after completing the current job two different ways: externally by sending the worker process a SIGTERM, or programmatically by setting a global variable.

提交回复
热议问题