resumeTasks only when configured and platform ready
This commit is contained in:
@@ -35,15 +35,14 @@ function initialize(callback) {
|
||||
|
||||
locker.on('unlocked', startNextTask);
|
||||
|
||||
if (cloudron.isConfiguredSync()) {
|
||||
resumeTasks();
|
||||
} else {
|
||||
cloudron.events.on(cloudron.EVENT_CONFIGURED, resumeTasks);
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
gPlatformReady = true;
|
||||
resumeTasks();
|
||||
|
||||
if (cloudron.isConfiguredSync()) {
|
||||
resumeTasks();
|
||||
} else {
|
||||
cloudron.events.on(cloudron.EVENT_CONFIGURED, resumeTasks);
|
||||
}
|
||||
}, 30000); // wait 30 seconds to signal platform ready
|
||||
|
||||
callback();
|
||||
|
||||
Reference in New Issue
Block a user