Permalink
Browse files

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

…k/moodle into MOODLE_21_STABLE
  • Loading branch information...
2 parents d4ccd2c + f40bce2 commit 537005082bde26fd79cf07e25a21fabc6b8c9e1d @danpoltawski danpoltawski 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 5370050

Please sign in to comment.