]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use connect_timeout value for execution margin
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 22 Jan 2016 11:19:17 +0000 (12:19 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 22 Jan 2016 11:21:06 +0000 (12:21 +0100)
plugins/OpportunisticQM/lib/opportunisticqueuemanager.php

index eeabfa531bbb643d230fe24b090b0e381e3530c3..7100ab72965a1bd81fe8e995b4bd1499a75530f7 100644 (file)
@@ -43,7 +43,7 @@ class OpportunisticQueueManager extends DBQueueManager
         }
 
         if ($this->max_execution_margin === null) {
-            $this->max_execution_margin = 10;    // should be calculated from our default timeouts for http requests etc.
+            $this->max_execution_margin = common_config('http', 'connect_timeout') + 1;   // think PHP's max exec time, minus this value to have time for timeouts etc.
         }
 
         return parent::__construct();