Answer the question
In order to leave comments, you need to log in
How to configure Gearman on MySQL so that it constantly picks up tasks from the queue?
Hello. Installed version Gearman 1.1.3. Configured Daemon start on the path /etc/init/gearman-job-server.conf
exec start-stop-daemon --start --chuid gearman --exec /usr/sbin/gearmand -- --log-file=/var/log/gearman-job-server/gearman.log \
--queue-type=MySQL --mysql-host=localhost --mysql-port=3306 \
--mysql-user=user --mysql-password=password \
--mysql-db=test --mysql-table=gearman_queue
$worker= new GearmanWorker();
$worker->addServer("localhost",4730);
$worker->addFunction("test", function(GearmanJob $job) {
//do something
});
, the tasks were completed in the table, the data was rubbed, everything is ok. BUT if I add tasks to the list in the table, they are no longer taken from the table, I launch the task directly, everything is ok. If I restart the daemon, then the tasks are picked up again. What am I doing wrong? How to set up the daemon in such a way that it checks the queue table?
Answer the question
In order to leave comments, you need to log in
You need a
circus process manager - https://circus.readthedocs.io/en/latest
supervisor- supervisord.org
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question