开发者

managing background processes started by multiple users

is there a solution to manage multiple background processes started by multiple users ? I am looking for a task scheduler/queuer. It should allow users to login, start new background processes, 开发者_开发知识库monitor them, and delete them.


a good option could be Gearman. In gearman you have to ways to run jobs: attached or background.

if you use attached jobs you can add callbacks functions to check the progress and make other stuff over the task. Look at the php api you will be able to see many good examples of the use of gearman. The only thing missing is the fact of killing (stop) the task. From my perspective you have two options:

  • keep the task polling and check the state of a certain flag: I would say a record on the db
  • save the pid and send a signal to the daemon to stop running: here you have a good example
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜