summaryrefslogtreecommitdiffstats
path: root/inc/trigger.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-25 12:36:26 +0100
committerSimon Rettberg2019-03-25 12:36:26 +0100
commitd949130ff1c948ba85f501022e9a090cab305147 (patch)
treea07bcec323fbcec33de27573ff80e8f5f9c464d8 /inc/trigger.inc.php
parent[serversetup-bwlp-ipxe] Redirect to serveraddr page if invalid (diff)
downloadslx-admin-d949130ff1c948ba85f501022e9a090cab305147.tar.gz
slx-admin-d949130ff1c948ba85f501022e9a090cab305147.tar.xz
slx-admin-d949130ff1c948ba85f501022e9a090cab305147.zip
[inc/Trigger] Wait for taskmanager on bootup
Diffstat (limited to 'inc/trigger.inc.php')
-rw-r--r--inc/trigger.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index e89a9a17..cc603719 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -50,7 +50,12 @@ class Trigger
*/
public static function autoUpdateServerIp()
{
- $task = Taskmanager::submit('LocalAddressesList');
+ for ($i = 0; $i < 5; ++$i) {
+ $task = Taskmanager::submit('LocalAddressesList');
+ if ($task !== false)
+ break;
+ sleep(1);
+ }
if ($task === false)
return false;
$task = Taskmanager::waitComplete($task, 10000);