snews_cs.cs_remote_commands

Attributes

log

Command Handler should take care of the stability of the input message

known_commands

contact_list_file

contact_list

Classes

Commands

Class for remote commands

CommandHandler

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]
snews_cs.cs_remote_commands.contact_list_file = b'.'[source]
snews_cs.cs_remote_commands.contact_list[source]
class snews_cs.cs_remote_commands.Commands[source]

Class for remote commands

known_command_functions[source]
passw[source]
_check_rights(message)[source]
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

hard_reset(message, CoincDeciderInstance)[source]

Authorized User (passing a correct password)

change_broker(message, CoincDeciderInstance)[source]
heartbeat_handle(message, CoincDeciderInstance)[source]

handle heartbeat

display_heartbeats(message, CoincDeciderInstance)[source]
retract_message(message, CoincDeciderInstance)[source]
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

input_message[source]
input_json[source]
command_name = None[source]
is_test = False[source]
Command_Executer[source]
username[source]
entry = Multiline-String[source]
Show Value
"""
|Uninferable|"""
check_message_format()[source]
handle(CoincDeciderInstance)[source]
check_command(CoincDeciderInstance)[source]