I have a problem with Gearman 0.32 (ppa:gearman-developers/ppa)- it doesn't save queue in Postgres for queue persistence.
- Gearman is running, I can add jobs (example with DEBUG verbosity on pastebin for better readability: http://pastebin.com/3uRds4yi )
- Postgres connection string is OK - I managed to login/access db using same data from same host
- Gearman connects to Postgres - if queue table doesn't exist in DB it creates it.
And despite all that NOTHING is added to DB. I have 0 workers registered and as I add new jobs to queue they get queued, but never saved in persistent storage.
Found the problem:
When using
Pecl Gearman
extension tasks added usingGearmanClient::addTask
(and high/low priority variants of the function) will be added to Gearman job queue, but not saved to database if PHP script times out beforeGearmanClient::runTasks
returns result.Use
GearmanClient::addTaskBackground
instead.