attpcdaq.daq.views.helpers.get_status¶
-
attpcdaq.daq.views.helpers.
get_status
(request)[source]¶ Returns some information about the system’s status.
This generates a dictionary containing the following key-value pairs:
- ‘overall_state’
- The overall state of the system. If all of the data sources have the same state, this should be the numerical ID of a state. If the sources have different states, it should be -1.
- ‘overall_state_name’
- The name of the overall state of the system. Either a state name or “Mixed” if the state is inconsistent.
- ‘run_number’
- The current run number.
- ‘run_title’
- The title of the current run.
- ‘run_class’
- The type of the current run.
- ‘start_time’
- The date and time when the current run started.
- ‘run_duration’
- The duration of the current run. This is with respect to the current time if the run has not ended.
- ‘ecc_server_status_list’
- Status of each ECC server. See
get_ecc_server_statuses()
for details. - ‘data_router_status_list’
- Status of each data router. See
get_data_router_statuses()
for details.
This is helpful when generating JSON responses to update the main page periodically.
Parameters: request (HttpRequest) – The request object. This must be included so we can get the name of the current user when fetching the Experiment
object.Returns: A dictionary containing the information above. Return type: dict