diff options
author | Simon Rettberg | 2014-06-06 17:50:17 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-06-06 17:50:17 +0200 |
commit | 7abc751ceb55c1f7492db141bb384260585c6ff1 (patch) | |
tree | 8c8e0c7d651b4e22a654ef1db65a0248465c66ac /inc | |
parent | make the table responsive. Fixes appearance on mobile devices (diff) | |
download | slx-admin-7abc751ceb55c1f7492db141bb384260585c6ff1.tar.gz slx-admin-7abc751ceb55c1f7492db141bb384260585c6ff1.tar.xz slx-admin-7abc751ceb55c1f7492db141bb384260585c6ff1.zip |
Variable timeout for Taskmanager::waitComplete
Diffstat (limited to 'inc')
-rw-r--r-- | inc/taskmanager.inc.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/taskmanager.inc.php b/inc/taskmanager.inc.php index dfacc5a7..308d7136 100644 --- a/inc/taskmanager.inc.php +++ b/inc/taskmanager.inc.php @@ -67,9 +67,9 @@ class Taskmanager return $reply; } - public static function waitComplete($task) + public static function waitComplete($task, $timeout = 1500) { - if (isset($task['id'])) { + if (is_array($task) && isset($task['id'])) { if ($task['statusCode'] !== TASK_PROCESSING && $task['statusCode'] !== TASK_WAITING) { self::release($task['id']); return $task; @@ -79,7 +79,7 @@ class Taskmanager if (!is_string($task)) return false; $done = false; - for ($i = 0; $i < 10; ++$i) { + for ($i = 0; $i < ($timeout / 150); ++$i) { $status = self::status($task); if (!isset($status['statusCode'])) break; |