Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-53063

Release cron locks on abnormal script termination (if possible)

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.0.2, 3.4
    • Tasks
    • MOODLE_30_STABLE, MOODLE_34_STABLE

      If a cron job is killed while running a scheduled task, it leaves an open lock on the task. In the case of the database lock factory, and probably others, it's a whole day before this lock is released, so the task is effectively disabled for a day.

      Where the PCNTL functions are enabled in PHP, it would be possible to register a handler for SIGTERM, SIGINT and SIGKILL that would mark the task as failed before exiting and prevent this problem.

            dobedobedoh Andrew Lyons
            maherne Michael Aherne
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.