mini_buildd.events module

class mini_buildd.events.Type(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

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

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)
ongoing()

Get ongoing status (bool) – convenience for template access

isummary()

Produce most noteworthy/usable textual information from event (for example, for an email body)

summary()
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)
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