The zaqar.storage.sqlalchemy.utils module

exception NoResult

Bases: exceptions.Exception

cid_decode(id)
cid_encode(id)
get_age(created)
get_qid(driver, queue, project)
json_decode(binary)
json_encode(obj)
julian_to_unix(julian_sec)

Converts Julian timestamp, in seconds, to a UNIX timestamp.

marker_decode(id)
marker_encode(id)
msgid_decode(id)
msgid_encode(id)
raises_conn_error(func)

Handles sqlalchemy DisconnectionError

When sqlalchemy detects a disconnect from the database server, it retries a number of times. After failing that number of times, it will convert the internal DisconnectionError into an InvalidRequestError. This decorator handles that error.

stat_message(message)

Creates a stat document based on a message.