Explicitly creating event handlers to avoid warnings
This commit is contained in:
1 parent
dd73e85b1c
commit
70808983e7
3 files changed
+5
-3
No files matched your search
@@ -104,6 +104,7 @@
|
||||
let event = {
|
||||
err: global.DEFAULT_OK_RESPONSE
|
||||
}
|
||||
global.SYSTEM_EVENT_HANDLER.createEventHandler(currentProcessKey, 'Process Execution Started')
|
||||
global.SYSTEM_EVENT_HANDLER.raiseEvent(currentProcessKey, 'Process Execution Started', event)
|
||||
|
||||
if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] start -> eventsCallBack -> " + currentProcessKey + " Process Execution Started because " + key + " Month: " + month + " Year: " + year + " Finished."); }
|
||||
@@ -117,6 +118,7 @@
|
||||
let event = {
|
||||
err: global.DEFAULT_OK_RESPONSE
|
||||
}
|
||||
global.SYSTEM_EVENT_HANDLER.createEventHandler(currentProcessKey, 'Process Execution Started')
|
||||
global.SYSTEM_EVENT_HANDLER.raiseEvent(currentProcessKey, 'Process Execution Started', event)
|
||||
|
||||
if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] start -> waitForDependantProcess -> " + currentProcessKey + " Process Execution Started Month: " + month + " Year: " + year); }
|
||||
@@ -140,6 +142,7 @@
|
||||
err: global.DEFAULT_OK_RESPONSE
|
||||
}
|
||||
|
||||
global.SYSTEM_EVENT_HANDLER.createEventHandler(currentProcessKey, 'Process Execution Finished')
|
||||
global.SYSTEM_EVENT_HANDLER.raiseEvent(currentProcessKey, 'Process Execution Finished', event)
|
||||
if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] finish -> " + currentProcessKey + " Process Execution Finished Month: " + month + " Year: " + year); }
|
||||
|
||||
|
||||
+1
-1
@@ -217,8 +217,8 @@
|
||||
let event = {
|
||||
lastFile: thisObject.file.lastFile
|
||||
}
|
||||
global.SYSTEM_EVENT_HANDLER.createEventHandler(key, 'Dataset Updated')
|
||||
global.SYSTEM_EVENT_HANDLER.raiseEvent(key, 'Dataset Updated', event)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,8 +73,7 @@ if (global.TASK_NODE !== undefined) {
|
||||
}
|
||||
else { // I use this section to debug in standalone mode.
|
||||
let argument
|
||||
argument = ' {"type":"Task","name":"Brings Trades Records from the Exchange","bot":{"type":"Sensor Bot Instance","name":"Charly","code":{"team":"AAMasters","bot":"AACharly","repo":"AACharly-Sensor-Bot"},"processes":[{"type":"Process Instance","subType":"Sensor Process Instance","name":"Live Trades","code":{"process":"Live-Trades"},"id":"338266fa-14c2-42eb-b0e5-d0a8ed9309fc","referenceParent":{"type":"Process Definition","name":"Live-Trades","code":{},"processOutput":{"type":"Process Output","name":"New Process Output","outputDatasets":[],"id":"9ffdaadd-5204-4436-b89e-cabd8f0e5829"},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","statusDependencies":[],"dataDependencies":[],"id":"a98b94ad-0cd4-4e54-ade4-68b0ab577414"},"statusReport":{"type":"Status Report","name":"New Status Report","id":"9f3ea81f-2aa1-41ec-907f-c003dec0c827"},"executionStartedEvent":{"type":"Execution Started Event","name":"New Execution Started Event","id":"942c8337-5d22-413d-9e44-e2da9a5479f1"},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"d5f1f2b3-ffa5-442b-b875-e91a786337ae","parentNode":{"type":"Process Definition","name":"Live-Trades","id":"371a2507-655b-46c5-b959-52f527cc4d7e","code":{}}},"calculations":{"type":"Calculations Procedure","name":"New Calculations Procedure","id":"e3774584-43e5-4dc5-b097-7b16476d586a"},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","id":"0f8cc852-ad72-40fe-bf4a-866e68439492"},"id":"371a2507-655b-46c5-b959-52f527cc4d7e"}},{"type":"Process Instance","subType":"Sensor Process Instance","name":"Hole Fixing","code":{"process":"Hole-Fixing"},"id":"3d7e0bdd-64e3-4442-8742-cc9282a82631","referenceParent":{"type":"Process Definition","name":"Hole-Fixing","code":{},"processOutput":{"type":"Process Output","name":"New Process Output","outputDatasets":[{"type":"Output Dataset","name":"New Output Dataset","id":"646ec2e6-98cb-489f-abb6-98b9bbdfa5f0","referenceParent":{"type":"Dataset Definition","name":"Trades","code":{},"id":"80c4ee03-aed4-4d8e-8145-a49f8b85df04"}}],"id":"4c577394-cc99-4d9d-ae73-38f28e08405d"},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","statusDependencies":[{"type":"Status Dependency","name":"New Status Dependency","id":"b707a221-e8f4-4d6f-824c-8e26e92b8093","referenceParent":{"type":"Status Report","name":"New Status Report","id":"03aa3c2e-d33c-4054-9150-1b641bc02e96"}},{"type":"Status Dependency","name":"New Status Dependency","id":"e9aedbfd-8b76-44c4-bfda-733da4f59023"},{"type":"Status Dependency","name":"New Status Dependency","id":"7a3ebb1b-1d28-4abd-9875-6b0d9c2ecea8","referenceParent":{"type":"Status Report","name":"New Status Report","id":"c542a73e-a350-431f-ad3e-10f3ebef8ec7"}}],"dataDependencies":[{"type":"Data Dependency","name":"New Data Dependency","id":"cab5ab89-a3e2-4833-a532-3884f0ff6fa9","referenceParent":{"type":"Dataset Definition","name":"Trades","code":{},"id":"80c4ee03-aed4-4d8e-8145-a49f8b85df04"}}],"id":"55891378-cdfa-4b6a-895e-235987c7b568"},"statusReport":{"type":"Status Report","name":"New Status Report","id":"03aa3c2e-d33c-4054-9150-1b641bc02e96"},"executionStartedEvent":{"type":"Execution Started Event","name":"New Execution Started Event","id":"39a7e02f-1b3b-49ea-9714-49f8fccc768d"},"executionFinishedEvent":{"type":"Execution Started Event","name":"New Execution Started Event","id":"39a7e02f-1b3b-49ea-9714-49f8fccc768d","referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"d5f1f2b3-ffa5-442b-b875-e91a786337ae","parentNode":{"type":"Process Definition","name":"Live-Trades","id":"371a2507-655b-46c5-b959-52f527cc4d7e","code":{}}}},"calculations":{"type":"Calculations Procedure","name":"New Calculations Procedure","id":"8777f6f4-8e49-487c-8a77-2f1e4be738b1"},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","id":"0d2e6c5a-cb53-4b72-b688-db9478024182"},"id":"b9d87bfc-1df9-4be3-b8c8-41131f5a9dc4"}}],"id":"85c4f582-56ee-4b8e-95b2-aa61baedfa39"},"id":"2fcbea08-a941-4891-80fd-236eacd83c11"}'
|
||||
|
||||
argument = '{"type":"Task","name":"Generates Bollinger Channels & Sub-Channels","bot":{"type":"Indicator Bot Instance","name":"Paula","code":{"team":"AAMasters","bot":"AAPaula","repo":"AAChris-Indicator-Bot"},"processes":[{"type":"Process Instance","subType":"Indicator Process Instance","name":"Daily","code":{"process":"Multi-Period-Daily"},"id":"81f0108b-8af9-4b22-94dd-81ef4a5c8065","referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","code":{"name":"Multi-Period-Daily","description":"Produces for each market two files with bollinger channels respectively at each day of the market history.","startMode":{"allMonths":{"run":"false","minYear":"","maxYear":""},"oneMonth":{"run":"false","year":"","month":""},"noTime":{"run":"true"},"fixedInterval":{"run":"false","interval":0}},"deadWaitTime":0,"normalWaitTime":0,"retryWaitTime":10000,"sleepWaitTime":3600000,"comaWaitTime":86400000,"framework":{"name":"Multi-Period-Daily","startDate":{"takeItFromStatusDependency":0},"endDate":{"takeItFromStatusDependency":1}}},"processOutput":{"type":"Process Output","name":"New Process Output","outputDatasets":[{"type":"Output Dataset","name":"New Output Dataset","id":"64430a93-38c2-4c71-8085-71661bbf804e","referenceParent":{"type":"Dataset Definition","name":"Daily","code":{"codeName":"Multi-Period-Daily","type":"Daily Files","validPeriods":["45-min","40-min","30-min","20-min","15-min","10-min","05-min","04-min","03-min","02-min","01-min"],"filePath":"AAMasters/AAPaula.1.0/AACloud.1.1/@Exchange/dataSet.V1/Output/Bollinger-Channels/Multi-Period-Daily/@Period/@Year/@Month/@Day","fileName":"@AssetA_@AssetB.json","dataRange":{"filePath":"AAMasters/AAPaula.1.0/AACloud.1.1/@Exchange/dataSet.V1/Output/Bollinger-Channels/Multi-Period-Daily","fileName":"Data.Range.@AssetA_@AssetB.json"}},"id":"64910fea-c92a-4a55-850a-aa62d98b478e"}},{"type":"Output Dataset","name":"New Output Dataset","id":"b536a078-e32a-4489-93f6-75107a90b527","referenceParent":{"type":"Dataset Definition","name":"Daily","code":{"codeName":"Multi-Period-Daily","type":"Daily Files","validPeriods":["45-min","40-min","30-min","20-min","15-min","10-min","05-min","04-min","03-min","02-min","01-min"],"filePath":"AAMasters/AAPaula.1.0/AACloud.1.1/@Exchange/dataSet.V1/Output/Bollinger-Standard-Sub-Channels/Multi-Period-Daily/@Period/@Year/@Month/@Day","fileName":"@AssetA_@AssetB.json","dataRange":{"filePath":"AAMasters/AAPaula.1.0/AACloud.1.1/@Exchange/dataSet.V1/Output/Bollinger-Standard-Sub-Channels/Multi-Period-Daily","fileName":"Data.Range.@AssetA_@AssetB.json"}},"id":"ca71e765-0f66-4b18-b500-847b9d16169b"}},{"type":"Output Dataset","name":"New Output Dataset","id":"d5bcc7c4-2798-4c34-9504-cc4617b64a04","referenceParent":{"type":"Dataset Definition","name":"Daily","code":{"codeName":"Multi-Period-Daily","type":"Daily Files","validPeriods":["45-min","40-min","30-min","20-min","15-min","10-min","05-min","04-min","03-min","02-min","01-min"],"filePath":"AAMasters/AAPaula.1.0/AACloud.1.1/@Exchange/dataSet.V1/Output/Bollinger-Sub-Channels/Multi-Period-Daily/@Period/@Year/@Month/@Day","fileName":"@AssetA_@AssetB.json","dataRange":{"filePath":"AAMasters/AAPaula.1.0/AACloud.1.1/@Exchange/dataSet.V1/Output/Bollinger-Sub-Channels/Multi-Period-Daily","fileName":"Data.Range.@AssetA_@AssetB.json"}},"id":"029479ae-275d-4854-ad3e-66948656a053"}},{"type":"Output Dataset","name":"New Output Dataset","id":"57898dc1-83a2-4ee9-8a0b-6674f988f0fa","referenceParent":{"type":"Dataset Definition","name":"Daily","code":{"codeName":"Multi-Period-Daily","type":"Daily Files","validPeriods":["45-min","40-min","30-min","20-min","15-min","10-min","05-min","04-min","03-min","02-min","01-min"],"filePath":"AAMasters/AAPaula.1.0/AACloud.1.1/@Exchange/dataSet.V1/Output/Bollinger-Standard-Channels/Multi-Period-Daily/@Period/@Year/@Month/@Day","fileName":"@AssetA_@AssetB.json","dataRange":{"filePath":"AAMasters/AAPaula.1.0/AACloud.1.1/@Exchange/dataSet.V1/Output/Bollinger-Standard-Channels/Multi-Period-Daily","fileName":"Data.Range.@AssetA_@AssetB.json"}},"id":"96b4e65b-e6db-44a0-80a5-ceb9d68a09ec"}}],"id":"b8fc5ac0-021d-4230-aa59-9876c5f0f3e1"},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","statusDependencies":[{"type":"Status Dependency","name":"New Status Dependency","id":"3cb29ee1-02de-452a-a79f-2451700fe335","referenceParent":{"type":"Status Report","name":"New Status Report","id":"7323fef7-870a-48b6-b96f-586111253b40"}},{"type":"Status Dependency","name":"New Status Dependency","id":"d5f34469-0ae1-45e6-acd9-4155d5940c77","referenceParent":{"type":"Status Report","name":"New Status Report","id":"c542a73e-a350-431f-ad3e-10f3ebef8ec7"}},{"type":"Status Dependency","name":"New Status Dependency","id":"7f6266a5-bddb-4d49-962d-100b1993043d","referenceParent":{"type":"Status Report","name":"New Status Report","id":"b1dd07bf-a698-4bbb-995a-356c929a1e94"}}],"dataDependencies":[{"type":"Data Dependency","name":"New Data Dependency","id":"073e24ab-6Line truncated
|
||||
try {
|
||||
global.TASK_NODE = JSON.parse(argument)
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user