summaryrefslogtreecommitdiffstats
path: root/inc/taskmanager.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2014-11-26 21:01:37 +0100
committerSimon Rettberg2014-11-26 21:01:37 +0100
commit177791970ee86a6653b051ee393801ad37134d70 (patch)
tree696fd696c89d4d587365fa7172ab0e184e183f07 /inc/taskmanager.inc.php
parentAdd HTTPS config module for webif, update everything to use FileUtil class, m... (diff)
downloadslx-admin-177791970ee86a6653b051ee393801ad37134d70.tar.gz
slx-admin-177791970ee86a6653b051ee393801ad37134d70.tar.xz
slx-admin-177791970ee86a6653b051ee393801ad37134d70.zip
Lots of small bugfixes, proxy config WIP, https config WIP, translation updates, added masterpassword to pxe menu, ...
Diffstat (limited to 'inc/taskmanager.inc.php')
-rw-r--r--inc/taskmanager.inc.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/inc/taskmanager.inc.php b/inc/taskmanager.inc.php
index 528b3f78..dd16c62d 100644
--- a/inc/taskmanager.inc.php
+++ b/inc/taskmanager.inc.php
@@ -80,6 +80,20 @@ class Taskmanager
}
/**
+ * Checks whether the given task id corresponds to a known task in the taskmanager.
+ * Returns true iff the taskmanager is reachable and the status of the task
+ * is different from NO_SUCH_TASK.
+ *
+ * @param string $taskid a task id
+ * @return boolean true if taskid exists in taskmanager
+ */
+ public static function isTask($taskid)
+ {
+ $task = self::status($taskid);
+ return isset($task['statusCode']) && $task['statusCode'] !== NO_SUCH_TASK;
+ }
+
+ /**
* Wait for the given task's completion.
*
* @param type $task task to wait for