Skip to content

Commit

Permalink
MDL-24684 backup - basic protection against time/memory limits
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jun 30, 2011
1 parent ff555b5 commit 910c941
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backup/controller/backup_controller.class.php
Expand Up @@ -290,6 +290,9 @@ public function get_logger() {
* @return void Throws and exception of completes * @return void Throws and exception of completes
*/ */
public function execute_plan() { public function execute_plan() {
// 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);
return $this->plan->execute(); return $this->plan->execute();
} }


Expand Down
3 changes: 3 additions & 0 deletions backup/controller/restore_controller.class.php
Expand Up @@ -296,6 +296,9 @@ public function get_logger() {
} }


public function execute_plan() { public function execute_plan() {
// 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);
return $this->plan->execute(); return $this->plan->execute();
} }


Expand Down

0 comments on commit 910c941

Please sign in to comment.