Closed KaraMelih closed 2 years ago
On the README can you add the python code needed to run the plug in
Thanks for noticing! I added those, and also updated the subscription section. Now, we allow for defining the output directory. By default, it is fetched from the env file
This PR adds the functionality to use a script as a plug in; any script that contains the following lines can be plugged in;
There is a simple example that can be used to test; user can run the following To start coincidence system,
snews_cs run-coincidence
To subscribe to the alert channel, and plug in any custom made script, which directly takes the alert input as it comessnews_pt subscribe -p <your path>/SNEWS_PT/test/random_plugin.py
In order to trigger an alertsnews_pt run-scenarios
The
snews_pt subscribe
command subscribes to the alert topic, and saves the data as soon as it comes, and the-p (--plugin)
option in the passes the path of this content to the given script. The first lines in the custom made plug-ins allows to read.Since these plugins are called anytime there is a new alert, there is no time loss.