This process can be customized for special data processing on mongodb changes.
Requires Node.js.
Custom processing can be
- CYCLIC - At regular adjustable intervals.
- BY EXCEPTION - By change on any mongodb collection (by exception).
- BY EXTERNAL SOURCE - By external events (requires nodejs coding, no example provided).
Check the customized_module.js file for examples of cyclic and by exception processing. The cs_custom_processor.js should not be edited, it provides MongoDB connection handling and redundancy control.
This process has the following command line arguments and equivalent environment variables.
- 1st arg. - Instance Number [Integer] - Instance number to be executed. Optional argument, default=1. Env. variable: JS_CSCUSTOMPROC_INSTANCE.
- 2nd arg. - Log. Level [Integer] - Log level (0=minimum,1=basic,2=detailed,3=debug). Optional argument, default=1. Env. variable: JS_CSCUSTOMPROC_LOGLEVEL.
- 3rd arg. - Config File Path/Name [String] - Path/name of the JSON-SCADA config file. Optional argument, default="../conf/json-scada.json". Env. variable: JS_CONFIG_FILE.
Command line args take precedence over environment variables.
A processInstance entry will be created with defaults if one is not found. It can be used to configure some parameters and limit nodes allowed to run instances.
See also