snews_cs.cs_remote_commands =========================== .. py:module:: snews_cs.cs_remote_commands Attributes ---------- .. autoapisummary:: snews_cs.cs_remote_commands.log snews_cs.cs_remote_commands.known_commands snews_cs.cs_remote_commands.contact_list_file snews_cs.cs_remote_commands.contact_list Classes ------- .. autoapisummary:: snews_cs.cs_remote_commands.Commands snews_cs.cs_remote_commands.CommandHandler Module Contents --------------- .. py:data:: log 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' .. py:data:: known_commands :value: ['test-connection', 'hard-reset', 'broker-change', 'Heartbeat', 'display-heartbeats',... .. py:data:: contact_list_file :value: b'.' .. py:data:: contact_list .. py:class:: Commands Class for remote commands .. py:attribute:: known_command_functions .. py:attribute:: passw .. py:method:: _check_rights(message) .. py:method:: execute(command_name, message, CoincDeciderInstance) 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. .. py:method:: test_connection(message, CoincDeciderInstance) 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 .. py:method:: hard_reset(message, CoincDeciderInstance) Authorized User (passing a correct password) .. py:method:: change_broker(message, CoincDeciderInstance) .. py:method:: heartbeat_handle(message, CoincDeciderInstance) handle heartbeat .. py:method:: display_heartbeats(message, CoincDeciderInstance) .. py:method:: retract_message(message, CoincDeciderInstance) .. py:method:: send_feedback(message, CoincDeciderInstance) 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': {}} .. py:class:: CommandHandler(message) 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 .. py:attribute:: input_message .. py:attribute:: input_json .. py:attribute:: command_name :value: None .. py:attribute:: is_test :value: False .. py:attribute:: Command_Executer .. py:attribute:: username .. py:attribute:: entry :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ |Uninferable|""" .. raw:: html
.. py:method:: check_message_format() .. py:method:: handle(CoincDeciderInstance) .. py:method:: check_command(CoincDeciderInstance)