Skip to content

Commit

Permalink
MDL-31553 do not timeout CLI upgrade scripts
Browse files Browse the repository at this point in the history
Credit goes to Michael Aherne.
  • Loading branch information
skodak committed Apr 23, 2012
1 parent 93fb7b5 commit 3691c0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 3691c0d

Please sign in to comment.