Locking with timeout
If the runner command would create a lock on the filesystem (probably with a periodic touch() to mark it's still alive, and a user configured timeout so you can say if the lock hasn't been touched in an hour just override it) then we could simply run it in a cron job every minute, and it would silently exit if another job is still in progress. It would be a bit easier to setup and maintain than having to run supervisord.
I guess we can add an option to the run command which would allow you to do that. I personally prefer to use supervisord since the command restarts as soon as the process exits. However, it doesn't hurt to support both ways.
On Mon, Nov 11, 2013 at 2:09 PM, Jordi Boggiano [email protected]:
If the runner command would create a lock on the filesystem (probably with a periodic touch() to mark it's still alive, and a user configured timeout so you can say if the lock hasn't been touched in an hour just override it) then we could simply run it in a cron job every minute, and it would silently exit if another job is still in progress. It would be a bit easier to setup and maintain than having to run supervisord.
— Reply to this email directly or view it on GitHubhttps://github.com/schmittjoh/JMSJobQueueBundle/issues/38 .
Yup it's not really critical functionality, and I'm running with supervisord as well, but it came up when we started using the bundle so I thought I'd put it here for the record, in case anyone feels like helping :)