snews_pt.__main__¶
Attributes¶
Functions¶
|
User interface for snews_pt tools |
|
Publish a message using snews_pub, multiple files are allowed |
|
Publish heartbeat message |
|
Subscribe to Alert topic |
|
Display the message format for each tier |
|
Test different coincidence scenarios |
|
Set your detectors name |
|
Test the connection to the server |
|
REQUIRES AUTHORIZATION | Print the HB logs on the server standard output |
|
REQUIRES AUTHORIZATION | Drop the current cache at the server |
|
REQUIRES AUTHORIZATION | If authorized, server changes the broker |
|
REQUIRES AUTHORIZATION | Get heartbeat feedback by email |
Module Contents¶
- snews_pt.__main__.publish(ctx, file, firedrill, force, verbose)[source]¶
Publish a message using snews_pub, multiple files are allowed
$: snews_pt publish my_json_message.json
Notes
The topics are read from the defaults i.e. from auxiliary/test-config.env If no file is given it can still submit dummy messages with default values
- snews_pt.__main__.heartbeat(ctx, status, time, firedrill, verbose)[source]¶
Publish heartbeat message
- Parameters:
status – Status of the experiment ON/OFF.
time – (optional) Machine time is appended as the time of execution different time can be passed following the iso-format
- snews_pt.__main__.subscribe(ctx, plugin, outputfolder, firedrill, test)[source]¶
Subscribe to Alert topic
Optionally, plugin script can be passed The message content as a single dictionary will be passed to this script as a positional argument. dictionary follows the snews_alert message schema
- snews_pt.__main__.message_schema(ctx, requested_tier)[source]¶
Display the message format for each tier
If ‘all’ is passed, displays everything.
- snews_pt.__main__.test_connection(ctx, firedrill, start_at, patience)[source]¶
Test the connection to the server
It should prompt your whether the coincidence script is running in the server :param start_at: str Where to start looking for the confirmation LATEST or EARLIEST :param patience: int seconds to wait before the check
Sometime, it takes time for server to respond, increase patience
- snews_pt.__main__.write_hb_logs(ctx, firedrill)[source]¶
REQUIRES AUTHORIZATION | Print the HB logs on the server standard output
later admins can see them remotely
- snews_pt.__main__.reset_cache(ctx, firedrill, test)[source]¶
REQUIRES AUTHORIZATION | Drop the current cache at the server