kinto-megaphone
Send global broadcast messages to Megaphone on changes.
Installation
Install the Python package:
pip install kinto-megaphone
Add it to kinto.includes:
kinto.includes = kinto_megaphone
Then, you’ll want to add a listener.
The kinto-megaphone listener is called KintoChangesListener and it watches the monitor/changes collection from kinto-changes. You provide a list of resources, and when those resources are updated in monitor/changes, we notify Megaphone with the new collection timestamp.
If talking to Megaphone fails, it will abort the request (including rolling back the changes made in the request).
kinto-megaphone only offers this one kind of listener right now, but that could change later.
Add it using configuration like:
kinto.event_listeners = mp kinto.event_listeners.mp.use = kinto_megaphone.listeners kinto.event_listeners.mp.api_key = foobar kinto.event_listeners.mp.url = https://megaphone.example.com/ kinto.event_listeners.mp.broadcaster_id = remote-settings kinto.event_listeners.mp.match_kinto_changes = /buckets/main /buckets/blocklists/collections/addons /buckets/blocklists/collections/gfx # Optional parameter ``except_kinto_changes``: # kinto.event_listeners.mp.except_kinto_changes = /buckets/main/collections/cfr-models
Note that the match_kinto_changes configuration only lets you describe resources that are tracked by kinto-changes – you won’t be able to put e.g. groups or accounts in there.
Changelog
This document describes changes between each past release.
0.5.0 (2020-03-24)
New features
Add option to exclude certain resources (fixes #75)
0.4.1 (2019-12-23)
Bug fixes
Send resource timestamp instead of event timestamp (fixes #65)
0.4.0 (2019-09-30)
Log version value when broadcasting to Megaphone
0.3.0 (2018-11-12)
Add configuration to restrict what kinto-changes records cause notifications (#13).
0.2.3 (2018-11-07)
Remove a broken log message (#10).
0.2.2 (2018-11-07)
I failed to correctly release 0.2.1. Try again.
0.2.1 (2018-11-07)
Add a few log messages to help try to troubleshoot.
0.2.0 (2018-09-25)
Update to match kinto 10.1.1 – see Kinto/kinto#1770 (#2).
Add a heartbeat feature.
0.1.0 (2018-09-12)
Initial implementation
Contributors
Ethan Glasser-Camp <eglassercamp@mozilla.com>
Release files for kinto-megaphone 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kinto-megaphone-0.5.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kinto_megaphone-0.5.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 13.7 kB
Release files / kinto-megaphone-0.5.0.tar.gz
| Download URL | kinto-megaphone-0.5.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5d89198ca382712006eeb6fea71ddace3f358e61fb4e932d7081d7e81cccfd8
|
|
BLAKE2b-256 checksum How to use checksums |
71655a0e75cb1c6925e89395750d22e88c8f6ee96433c5389f02cfc67bd19a18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|
Release files / kinto_megaphone-0.5.0-py2.py3-none-any.whl
| Download URL | kinto_megaphone-0.5.0-py2.py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d9cb79bf6ff02a42e1744c086fcdfc966e1a6a81559d14ad86fe9656f781b27a
|
|
BLAKE2b-256 checksum How to use checksums |
e2b70d66169b4190348834929d5a8342e1eb585bce26e9ce179050adea677f33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|