-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
4.1.4
-
None
-
MOODLE_401_STABLE
Hello,
We found this error in our cron logfile :
This task has been running for more than 1 heure so stopping this execution. |
... used 90580 dbqueries |
... used 3756.4760529995 seconds |
Scheduled task failed: Recalculer les statistiques de question (quiz_statistics\task\recalculate),Erreur de programmation détectée. Ceci doit être corrigé par un programmeur : moodle_database::get_in_or_equal() does not accept empty arrays
|
Backtrace:
|
* line 564 of /question/engine/datalib.php: call to moodle_database->get_in_or_equal() |
* line 295 of /question/classes/statistics/questions/calculator.php: call to question_engine_data_mapper->load_questions_usages_latest_steps() |
* line 96 of /question/classes/statistics/questions/calculator.php: call to core_question\statistics\questions\calculator->get_latest_steps() |
* line 660 of /mod/quiz/report/statistics/report.php: call to core_question\statistics\questions\calculator->calculate() |
* line 950 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->get_all_stats_and_analysis() |
* line 108 of /mod/quiz/report/statistics/classes/task/recalculate.php: call to quiz_statistics_report->calculate_questions_stats_for_question_bank() |
* line 263 of /lib/cronlib.php: call to quiz_statistics\task\recalculate->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() |
It appears that this timeout value is written in the code :
mod/quiz/report/statistics/classes/task/recalculate.php
class recalculate extends \core\task\scheduled_task { |
/** @var int the maximum length of time one instance of this task will run. */ |
const TIME_LIMIT = 3600; |
|
I think this should be using the global task_scheduled_max_runtime parameter instead.