This commit is contained in:
1 parent
1326a9ae8c
commit
3cb16b4e62
3 files changed
+21
-15
No files matched your search
@@ -107,11 +107,12 @@ function newWorkspace () {
|
||||
}
|
||||
|
||||
function recreateWorkspace () {
|
||||
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode, false, finishInitialization)
|
||||
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode, finishInitialization)
|
||||
}
|
||||
|
||||
function finishInitialization () {
|
||||
setupEventsServerClients()
|
||||
runTasksAndSessions(false)
|
||||
thisObject.enabled = true
|
||||
canvas.cockpitSpace.initializePosition()
|
||||
canvas.splashScreen.initialize()
|
||||
@@ -122,6 +123,19 @@ function newWorkspace () {
|
||||
}
|
||||
}
|
||||
|
||||
function runTasksAndSessions (replacingCurrentWorkspace) {
|
||||
if (replacingCurrentWorkspace === true) {
|
||||
// We need to wait all tasks that were potentially running to stop
|
||||
setTimeout(functionLibraryUiObjectsFromNodes.runTasks, 70000)
|
||||
// We give a few seconds for the tasks to start
|
||||
setTimeout(functionLibraryUiObjectsFromNodes.runSessions, 80000)
|
||||
} else {
|
||||
functionLibraryUiObjectsFromNodes.runTasks()
|
||||
// We give a few seconds for the tasks to start
|
||||
setTimeout(functionLibraryUiObjectsFromNodes.runSessions, 10000)
|
||||
}
|
||||
}
|
||||
|
||||
function setupEventsServerClients () {
|
||||
for (let i = 0; i < thisObject.workspaceNode.rootNodes.length; i++) {
|
||||
let rootNode = thisObject.workspaceNode.rootNodes[i]
|
||||
@@ -244,8 +258,9 @@ function newWorkspace () {
|
||||
workingAtTask++
|
||||
break
|
||||
case 4:
|
||||
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode, true)
|
||||
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode)
|
||||
setupEventsServerClients()
|
||||
runTasksAndSessions(true)
|
||||
workingAtTask++
|
||||
break
|
||||
case 5:
|
||||
|
||||
Reference in new issue
Block a user