avocado.core.status package¶
Submodules¶
avocado.core.status.repo module¶
-
exception
avocado.core.status.repo.StatusMsgMissingDataError¶ Bases:
ExceptionStatus message does not contain the required data.
-
class
avocado.core.status.repo.StatusRepo(job_id)¶ Bases:
objectMaintains tasks’ status related data and provides aggregated info.
Initializes a new StatusRepo
Parameters: job_id (str) – the job unique identification for which the messages are destined to. -
get_all_task_data(task_id)¶ Returns all data on a given task, by its ID.
-
get_latest_task_data(task_id)¶ Returns the latest data on a given task, by its ID.
-
get_result_set_for_tasks(task_ids)¶ Returns a set of results for the given tasks.
-
get_task_data(task_id, index)¶ Returns the data on the index of a given task, by its ID.
-
get_task_status(task_id)¶
-
process_message(message)¶
-
process_raw_message(raw_message)¶
-
result_stats¶
-
status_journal_summary¶
-
avocado.core.status.server module¶
-
class
avocado.core.status.server.StatusServer(uri, repo)¶ Bases:
objectServer that listens for status messages and updates a StatusRepo.
Initializes a new StatusServer.
Parameters: - uri (str) – either a “host:port” string or a path to a UNIX socket
- repo (
avocado.core.status.repo.StatusRepo) – the repository to use to process received status messages
-
cb(reader, _)¶
-
close()¶
-
create_server()¶
-
serve_forever()¶
-
uri¶
avocado.core.status.utils module¶
-
exception
avocado.core.status.utils.StatusMsgInvalidJSONError¶ Bases:
ExceptionStatus message does not contain valid JSON.
-
avocado.core.status.utils.json_base64_decode(dct)¶ base64 decode object hook for custom JSON encoding.
-
avocado.core.status.utils.json_loads(data)¶ Loads and decodes JSON, with added base64 decoding.
Parameters: data – either bytes or a string. If bytes, will be decoded using the current default encoding. Raises: Returns: decoded Python objects