lavary / crunz

A PHP-based job scheduler
MIT License
1.42k stars 136 forks source link

Unlock locked task #382

Open danielbattat opened 2 years ago

danielbattat commented 2 years ago

I noticed my tasks weren't running and that removing preventOverlapping() solved the issue. However, I would like to keep preventOverlapping.

I used ps and saw that I had a /vendor/bin/crunz process running for more than a week. A killed the processes, thinking that would free the lock, but that didn't help. How can I free this lock?

Also, is there any mechanism in Crunz that would have prevented this from happening? Maybe kill the lock after X amount of time passed, or after X runs were skipped?

PabloKowalczyk commented 2 years ago

Hello, do you use default backend for locks? By default Crunz uses https://symfony.com/doc/current/components/lock.html#flockstore which, should, release lock on process end.

Another question is why Crunz runs for more than week?

You can pass any lock backend supported by Symfony.