Skip to content

Commit

Permalink
MDL-41254 backup Raise time and memory limit in precheck.
Browse files Browse the repository at this point in the history
  • Loading branch information
micaherne committed Sep 2, 2013
1 parent 5e86f2e commit dc4018e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backup/controller/restore_controller.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ public function execute_precheck($droptemptablesafter = false) {
if ($this->status != backup::STATUS_NEED_PRECHECK) {
throw new restore_controller_exception('cannot_precheck_wrong_status', $this->status);
}
// Basic/initial prevention against time/memory limits
set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
raise_memory_limit(MEMORY_EXTRA);
$this->precheck = restore_prechecks_helper::execute_prechecks($this, $droptemptablesafter);
if (!array_key_exists('errors', $this->precheck)) { // No errors, can be executed
$this->set_status(backup::STATUS_AWAITING);
Expand Down

0 comments on commit dc4018e

Please sign in to comment.