MDL-31553 do not timeout CLI upgrade scripts

Credit goes to Michael Aherne.
This commit is contained in:
Petr Skoda
2012-04-23 08:53:41 +02:00
parent 93fb7b528b
commit 3691c0de24
+6 -1
View File
@@ -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
}