Helper library to process messages on rabbit.opensuse.org
Project description
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_rodo-0.0.1.tar.gz.
File metadata
- Download URL: py_rodo-0.0.1.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95f1264f223df48cce8deec6e7ec6b599aa1aec4c8845090b685d3ba7b97c04e
|
|
| MD5 |
1cd5df9a28dd85655e8b5e4dd5d65ba9
|
|
| BLAKE2b-256 |
060bbce65f28512feb6acfc51711019b3a79959f0be4b3452d06675953ca7031
|
File details
Details for the file py_rodo-0.0.1-py3-none-any.whl.
File metadata
- Download URL: py_rodo-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec48877eba03e3cad4653d1e2f1f1873d8d2f3542563cc475c7ed3daed150fc3
|
|
| MD5 |
b4067a236299444c60081715fbdacb6f
|
|
| BLAKE2b-256 |
b6b3f262c70e7e1688edf8860022cf82109a5352797771caf24e003b226ee144
|