Listening to events when Datasets are updated on Daily Files
This commit is contained in:
1 parent
566e7060d8
commit
8cdb5e6078
3 files changed
+16
-17
No files matched your search
@@ -462,11 +462,12 @@ function newPlottersManager () {
|
||||
canvas.panelsSpace.destroyPanel(productPlotters[i].panels[j])
|
||||
}
|
||||
/* Finally the Storage Objects */
|
||||
productPlotters[i].storage.finalize()
|
||||
|
||||
if (productPlotters[i].plotter.finalize !== undefined) {
|
||||
productPlotters[i].plotter.container.finalize()
|
||||
productPlotters[i].plotter.finalize()
|
||||
}
|
||||
productPlotters[i].storage.finalize()
|
||||
productPlotters.splice(i, 1) // Delete item from array.
|
||||
return // We already found the product woth changes and processed it.
|
||||
}
|
||||
@@ -530,4 +531,3 @@ function newPlottersManager () {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ function newRestartSimulation () {
|
||||
let executionFocusExists = false
|
||||
let idleLabel = ''
|
||||
let isRunning = false
|
||||
let eventSubscriptionIdSimulationFilesUpdated
|
||||
|
||||
let eventSubscriptionIdProcessStopped
|
||||
|
||||
return thisObject
|
||||
@@ -46,8 +46,8 @@ function newRestartSimulation () {
|
||||
thisObject.container.eventHandler.stopListening(selfMouseClickEventSubscriptionId)
|
||||
thisObject.container.eventHandler.stopListening(selfMouseNotOverEventSubscriptionId)
|
||||
|
||||
systemEventHandler.stopListening('Jason-Multi-Period', eventSubscriptionIdSimulationFilesUpdated)
|
||||
systemEventHandler.stopListening('Jason-Multi-Period', eventSubscriptionIdProcessStopped)
|
||||
systemEventHandler.deleteEventHandler('Cockpit-Restart-Button')
|
||||
|
||||
thisObject.container.finalize()
|
||||
thisObject.container = undefined
|
||||
@@ -65,19 +65,12 @@ function newRestartSimulation () {
|
||||
|
||||
systemEventHandler.createEventHandler('Cockpit-Restart-Button')
|
||||
|
||||
/*
|
||||
We will start listening to the event that is triggered when the simulation process finishes processing one day in the case
|
||||
of daily files or the whole market in the case of market files.
|
||||
*/
|
||||
eventSubscriptionIdSimulationFilesUpdated = systemEventHandler.listenToEvent('Jason-Multi-Period', 'Simulation Files Updated', undefined, undefined, undefined, onFilesUpdated)
|
||||
systemEventHandler.listenToEvent('Jason-Multi-Period', 'Process Stopped', undefined, 'Cockpit-Restart-Button', onResponse, onProcessStopped)
|
||||
|
||||
function onFilesUpdated (message) {
|
||||
turnOffProductCards()
|
||||
turnOnProductCards()
|
||||
function onResponse (message) {
|
||||
eventSubscriptionIdProcessStopped = message.eventSubscriptionId
|
||||
}
|
||||
|
||||
eventSubscriptionIdProcessStopped = systemEventHandler.listenToEvent('Jason-Multi-Period', 'Process Stopped', undefined, undefined, undefined, onProcessStopped)
|
||||
|
||||
function onProcessStopped (message) {
|
||||
thisObject.status = 'Ready'
|
||||
isRunning = false
|
||||
|
||||
@@ -23,11 +23,14 @@ function newCircularProgressBar () {
|
||||
|
||||
let opacityCounters = []
|
||||
|
||||
let eventSubscriptionHeartbeat
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
thisObject.container = undefined
|
||||
systemEventHandler.stopListening('Jason-Heartbeat-Period', eventSubscriptionHeartbeat)
|
||||
|
||||
thisObject.container = undefined
|
||||
thisObject.payload = undefined
|
||||
thisObject.fitFunction = undefined
|
||||
}
|
||||
@@ -40,8 +43,11 @@ function newCircularProgressBar () {
|
||||
}
|
||||
|
||||
let key = thisObject.payload.node.name + '-' + thisObject.payload.node.type + '-' + thisObject.payload.node.id
|
||||
// systemEventHandler.createEventHandler(key)
|
||||
systemEventHandler.listenToEvent(key, 'Heartbeat', undefined, key, undefined, onHeartBeat)
|
||||
systemEventHandler.listenToEvent(key, 'Heartbeat', undefined, key, onResponse, onHeartBeat)
|
||||
|
||||
function onResponse (message) {
|
||||
eventSubscriptionIdHeartbeat = message.eventSubscriptionId
|
||||
}
|
||||
}
|
||||
|
||||
function onHeartBeat (message) {
|
||||
|
||||
Reference in new issue
Block a user