Skip to content
Browse files

Merge branch 'w17_MDL-31553_m22_clitimeout' of git://github.com/skoda…

…k/moodle into MOODLE_22_STABLE
  • Loading branch information...
2 parents 4be1298 + 3691c0d commit 7b969f0bb0ba56c49dbf92de4703340273dd8a16 @danpoltawski danpoltawski committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/moodlelib.php
View
7 lib/moodlelib.php
@@ -8581,7 +8581,12 @@ function upgrade_set_timeout($max_execution_time=300) {
return;
}
- set_time_limit($max_execution_time);
+ if (CLI_SCRIPT) {
+ // there is no point in timing out of CLI scripts, admins can stop them if necessary
+ set_time_limit(0);
+ } else {
+ set_time_limit($max_execution_time);
+ }
set_config('upgraderunning', $expected_end); // keep upgrade locked until this time
}

0 comments on commit 7b969f0

Please sign in to comment.
Something went wrong with that request. Please try again.