Safea-proxy
What to do if CronLock jams?
How can you know if CronLock jams?
You will see message below repeatedly on #safea-proxy channel at Slack:
|
|
One or even three times is okay, but if it keeps coming every minute, you should take actions!
How to Unlock CronLock?
Connect to etera-meteor production db and find all jammed tasks:
|
|
status: -1 means not handled, status: 0 means in progress and status: 1 means handled.
You will get list of all jammed tasks and there is bookingIds showing and you can start tracking what went wrong.
But if you are in hurry and/or those were your bookings you can solve it like this:
|
|
Here we change task status as handled by setting it to 1 besides that we also need to update handleAt by setting ISODate for it. After you have updated all jammed tasks, CronLock opens and it continues handling new tasks.
Alternatively you could just remove those jammed tasks, but we prefer the way shown above.