snews_cs.cs_remote_commands¶
Attributes¶
Command Handler should take care of the stability of the input message |
|
Classes¶
Class for remote commands |
|
class to handle the manual command issued by the admins |
Module Contents¶
- snews_cs.cs_remote_commands.log[source]¶
Command Handler should take care of the stability of the input message Then check if the message is a remote command or actually a Tier message (use new SnewsFormat) Then give a “go” to coincidence decider if valid. Only if it is not a tier message and a command should invoke ‘Commands’
- snews_cs.cs_remote_commands.known_commands = ['test-connection', 'hard-reset', 'broker-change', 'Heartbeat', 'display-heartbeats',...[source]¶
- class snews_cs.cs_remote_commands.Commands[source]¶
Class for remote commands
- execute(command_name, message, CoincDeciderInstance)[source]¶
If Command Handler finds a Remote Command from known_commands It returns the name, message and the CoincidenceInstance Here we perform some remote commands on that CoincidenceInstance such as resetting the cache.
- test_connection(message, CoincDeciderInstance)[source]¶
When received a test_connection key in observation topic reinstert the message with updated status to connection topic this way user can test if their message goes and comes back from the server, by looking into the connection topic
- send_feedback(message, CoincDeciderInstance)[source]¶
Check the user and pre-compiled email list send an email with a feedback from past 24H multiple mails are allowed by separating semicolon “;” Expected message format message = {‘id’: ‘0_Get-Feedback’,
‘email’: email_address, ‘detector_name’: detector_name, ‘meta’: {}}
- class snews_cs.cs_remote_commands.CommandHandler(message)[source]¶
class to handle the manual command issued by the admins These commands can be - Garbage message handling - Reset the cache - Test connection - Retract messages - Testing-purpose submissions - Get logs - Change Broker - Request Feedback