moodle-tool_trigger icon indicating copy to clipboard operation
moodle-tool_trigger copied to clipboard

Process workflows scheduled task fails due to missing 'eventid'

Open szelim opened this issue 4 years ago • 0 comments

The "Process workflows" scheduled cron task fails repeatedly. The query running is trying to insert a null value into a table that doesn't allow null values. The 'eventid' column within the mdl_tool_trigger_workflow_hist table on the site's database is numerical values only.

... started 07:35:25. Current memory use 19.5MB.
Executing workflow: 1
... used 9 dbqueries
... used 0.052000045776367 seconds
Scheduled task failed: Process workflows scheduled task. (tool_trigger\task\process_workflows),Error writing to database
Debug info:
Column 'eventid' cannot be null
INSERT INTO mdl_tool_trigger_workflow_hist (workflowid,number,timecreated,event,eventid) VALUES(?,?,?,?,?)
[array (
  0 => 1,
  1 => 34,
  2 => 1624430125,
  3 => 'false',
  4 => NULL,
)]
Backtrace:
* line 1357 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1403 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 300 of /admin/tool/trigger/classes/event_processor.php: call to mysqli_native_moodle_database->insert_record()
* line 175 of /admin/tool/trigger/classes/task/process_workflows.php: call to tool_trigger\event_processor::record_workflow_trigger()
* line 142 of /admin/tool/trigger/classes/task/process_workflows.php: call to tool_trigger\task\process_workflows->process_item()
* line 91 of /admin/tool/trigger/classes/task/process_workflows.php: call to tool_trigger\task\process_workflows->process_queue()
* line 253 of /lib/cronlib.php: call to tool_trigger\task\process_workflows->execute()
* line 120 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
* line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
* line 178 of /admin/cli/cron.php: call to cron_run()
  • Moodle version: 3.10.4 (Build: 20210510)
  • "pluginversion":"2021030400"

szelim avatar Jun 23 '21 08:06 szelim