Skip to main content

This is a small helper library to process messages emitted to rabbit.opensuse.org by the Open Build Service.

Usage

The main entry point for this library is the QueueProcessor class, which listens to the message bus, processes messages and invokes user defined callbacks depending on the message routing keys.

The message callback functions receive a child class of ObsMessageBusPayloadBase as the single argument and should return nothing. The specific subtype of ObsMessageBusPayloadBase can be infered from the dictionary QUEUE_TO_PAYLOAD_TYPE which maps the routing keys to specific payload types.

To only process package commit messages, create the following callback:

def commit_to_my_package(payload: PackageCommitPayload) -> None:
    # process the payload here

callbacks = {RoutingKey.PACKAGE_COMMIT: commit_to_my_package}

qp = QueueProcessor(callbacks=callbacks)
qp.listen_forever()

Release files for py-rodo 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-rodo 0.0.1
File Size Uploaded
py_rodo-0.0.1.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-rodo 0.0.1
File Interpreter ABI Platform
py_rodo-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 kB

Release files / py_rodo-0.0.1.tar.gz

Download URL py_rodo-0.0.1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
95f1264f223df48cce8deec6e7ec6b599aa1aec4c8845090b685d3ba7b97c04e
BLAKE2b-256 checksum
How to use checksums
060bbce65f28512feb6acfc51711019b3a79959f0be4b3452d06675953ca7031
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / py_rodo-0.0.1-py3-none-any.whl

Download URL py_rodo-0.0.1-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec48877eba03e3cad4653d1e2f1f1873d8d2f3542563cc475c7ed3daed150fc3
BLAKE2b-256 checksum
How to use checksums
b6b3f262c70e7e1688edf8860022cf82109a5352797771caf24e003b226ee144
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page