avocado.core.status package

Submodules

avocado.core.status.repo module

exception avocado.core.status.repo.StatusMsgMissingDataError

Bases: Exception

Status message does not contain the required data.

class avocado.core.status.repo.StatusRepo(job_id)

Bases: object

Maintains 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)
property result_stats
status_journal_summary_pop()

avocado.core.status.server module

class avocado.core.status.server.StatusServer(uri, repo)

Bases: object

Server that listens for status messages and updates a StatusRepo.

Initializes a new StatusServer.

Parameters:
async cb(reader, _)
close()
async create_server()
async serve_forever()
property uri

avocado.core.status.utils module

exception avocado.core.status.utils.StatusMsgInvalidJSONError

Bases: Exception

Status 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

Module contents