mini_buildd.events module

class mini_buildd.events.Type(value)

Bases: Enum

An enumeration.

REJECTED = 1
BUILDING = 2
BUILT = 3
PACKAGING = 4
INSTALLED = 5
FAILED = 6
MIGRATED = 7
REMOVED = 8
mini_buildd.events.DESC = {<Type.REJECTED: 1>: 'User upload was rejected', <Type.BUILDING: 2>: 'Building on one of our chroots has started', <Type.BUILT: 3>: 'Building on one of our chroots has finished (does not imply a successful build result)', <Type.PACKAGING: 4>: 'Packaging to one of our repositories has started', <Type.INSTALLED: 5>: 'Packaging to one of our repositories was successful', <Type.FAILED: 6>: 'Packaging to one of our repositories has failed', <Type.MIGRATED: 7>: 'A package in one of our repositories has been migrated', <Type.REMOVED: 8>: 'A package in one of our repositories has been removed'}

Human-readable semantics of all event types.

class mini_buildd.events.Event(type_, distribution, source, version, extra)

Bases: object

ongoing

Special run-time only flag (see Events.log()). For events outside Events(), this will always be false.

strerror()

Public human-readable one-liner string from extra.error.

desc()
match(types=None, distribution=None, source=None, version=None, minimal_version=None)
to_json()
classmethod from_json(data)
classmethod from_changes(typ, changes, exception=None, extra=None)
save_as(file_path)
json_file_name()
classmethod load(file_path)
class mini_buildd.events.Queue(*args, **kwargs)

Bases: deque

log(typ, changes, exception=None, extra=None)
attach(obj, after=None)
shutdown()

Hint shutdown to all client (queues). Essentially makes blocking get() in httpd.py continue so httpd can shutdown.

to_json()
classmethod from_json(events, maxlen)
classmethod load(maxlen)
mbd_slice(maxlen=None)

Return triple: <list of newest events>, <total number of events in queue>, <max number of events in queue>, <number of ongoing>.

class mini_buildd.events.Attach(events, *args, **kwargs)

Bases: object

get()
mini_buildd.events.ifilter(ievents, types=None, distribution=None, source=None, version=None, minimal_version=None, exit_on=None, fail_on=None)
mini_buildd.events.load(path='', after=None, before=None, maxlen=None)

Load events (as normal list) from events path, ordered as issued using event’s timestamp.