nyeholt / silverstripe-gearman

A basic integration with gearmand
6 stars 4 forks source link

Jobs get stuck if Gearman runner fails #1

Open MarcusDalgren opened 10 years ago

MarcusDalgren commented 10 years ago

Hi,

I've been using your excellent Queued jobs module together with this Gearman module to great effect in one of my projects. Right now I'm trusting the job handoff to go smoothly but when checking my logs I noticed that my MySQL server is not as robust as one would hope.

This leads to Gearman outputting "MySQL has gone away"-errors but it keeps running like the champ it is. However whatever job was going to be run at this point gets stuck with the new status and this prevents new jobs of that type from getting added to the queue. I was hoping that throwing a new job of the same type on the queue would run the old one but this does not seem to be the case.

Do I need to be running the normal cron version as well for cleanup purposes in case Gearman fails or will this just cause more mischief?

nyeholt commented 10 years ago

At present yes, you'll need to have the cron backup, as I haven't got around to figuring out a nice cleanup process for jobs that go missing in gearmand. You'll need the cron side of things anyway if you're wanting to do scheduled jobs (which I use in the systems that I use gearmand on too).