Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.
/ kinto-megaphone Public archive

Send global broadcast messages to Megaphone on changes

License

Notifications You must be signed in to change notification settings

Kinto/kinto-megaphone

Repository files navigation

kinto-megaphone

travis Coverage

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.

About

Send global broadcast messages to Megaphone on changes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •