Permalink
Browse files

MDL-31553 do not timeout CLI upgrade scripts

Credit goes to Michael Aherne.
  • Loading branch information...
1 parent bd44a3b commit f40bce2565d53284aa3c2da8ad05e61048043650 @skodak skodak committed Apr 23, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/moodlelib.php
View
@@ -8106,7 +8106,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 f40bce2

Please sign in to comment.