Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When expiring lock, set lastRunTime to startTime of last successful jobRun (or null) #633

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jenshp
Copy link
Member

@jenshp jenshp commented May 30, 2024

When a Job Run is interrupted and never ends (e.g. due to a server crash), moqui will at first wait for the expireLockTime specified in the Service Job. After that time, the lock will be cleared, but the lastRunTime would remain at the time the lock was acquired, which is interpreted as the las time the job was successfully run.
This PR fixes this issue, setting the lastRunTime either back to the last successful Job Run, or null if there has not been one. This is the same behavior applied when moqui handles an error during the execution of the Job Run.

@acetousk
Copy link
Member

I reviewed the code and this looks good to me.

See: https://forum.moqui.org/t/last-run-time-in-scheduledjobrunner/691/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants