Skip to content

Scheduled task failure (tool_objectfs\task\push_objects_to_storage) #698

@ppv1979

Description

@ppv1979

The log of scheduled task has the following error:

====================
Execute scheduled task: Object file system upload task (tool_objectfs\task\push_objects_to_storage)
... started 18:43:00. Current memory use 14.8 Мбайт.
... used 5 dbqueries
... used 0.13418507575989 seconds
Scheduled task failed: Object file system upload task (tool_objectfs\task\push_objects_to_storage),Coding error detected, it must be fixed by a programmer: A lock was created but not released at:
/var/www/devmoodle/moodle/admin/tool/objectfs/classes/local/store/object_file_system.php on line 317

Code should look like:

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

Backtrace:

  • line 86 of /admin/tool/objectfs/classes/local/object_manipulator/manipulator_builder.php: call to core\lock\lock->__destruct()
  • line 69 of /admin/tool/objectfs/classes/task/task.php: call to tool_objectfs\local\object_manipulator\manipulator_builder->execute()
  • line 410 of /lib/classes/cron.php: call to tool_objectfs\task\task->execute()
  • line 194 of /admin/cli/scheduled_task.php: call to core\cron::run_inner_scheduled_task()
    ===================

Can you fix it?

Moodle 4.5.5+ (Build: 20250731)
tool_objectfs 2025040900

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions