Answer the question
In order to leave comments, you need to log in
How to build task logic in gearman php?
There is an application that always needs to check the task and its time from the database, and if this time is < time (), then perform the action, there are many such tasks, I tried the supervisor in conjunction with gearman, but it turns out that if the time has not yet come, gearman executes the task, and reads it completed, and when the time comes, the task is not executed accordingly.
How to be? How are these issues resolved in large projects?
Answer the question
In order to leave comments, you need to log in
is it possible to make it simpler and give up time in favor of the "done" flag or not?
As an option, use a client that runs every minute by cron, and not a worker. And as soon as the time has come to send the task to the worker.
If you need delayed tasks, then it's probably better to look towards beanstalkd, in it you can set the time before the task is completed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question