MDL-46881 forum: Adjust limits for tasks
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 29 Jan 2019 01:36:21 +0000 (09:36 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 30 Jan 2019 02:55:48 +0000 (10:55 +0800)
mod/forum/classes/task/send_user_digests.php
mod/forum/classes/task/send_user_notifications.php

index 395e61f..30fd738 100644 (file)
@@ -138,9 +138,6 @@ class send_user_digests extends \core\task\adhoc_task {
      * Send out messages.
      */
     public function execute() {
-        // Terminate if not able to fetch all digests in 5 minutes.
-        \core_php_time_limit::raise(300);
-
         $starttime = time();
 
         $this->recipient = \core_user::get_user($this->get_userid());
index 552177a..acc4034 100644 (file)
@@ -99,6 +99,9 @@ class send_user_notifications extends \core\task\adhoc_task {
     public function execute() {
         global $CFG;
 
+        // Raise the time limit for each discussion.
+        \core_php_time_limit::raise(120);
+
         $this->recipient = \core_user::get_user($this->get_userid());
 
         // Create the generic messageinboundgenerator.