Skip to content

Cron Job Failure due to Unreleased Lock #192

@jpaulinog

Description

@jpaulinog

I'm experiencing an issue while running the cron job on the Arlo Moodle Plugin. The problem arises when I run the cron job at the following URL: https://domain.com/admin/cron.php.

The error message I receive is:

Scheduled task failed: Push outcome and process information to Arlo registrations (enrol_arlo\task\outcomes),Coding error detected, it must be fixed by a programmer: A lock was created but not released at:
/var/www/html/enrol/arlo/classes/local/job/outcomes_job.php

on line 138

Code should look like:

$factory = \core\lock\lock_config::get_lock_factory('type');
$lock = $factory->get_lock(11df16541bfecb139a485650300a03a45080094d);
$lock->release(); // Locks must ALWAYS be released like this.

The error started occurring after the site was upgraded from Moodle 3.9.x to Moodle 4.2.x

Screenshot
screenshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions