Skip to main content

Send global broadcast messages to Megaphone on changes

Project description

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

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.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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kinto-megaphone-0.4.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

kinto_megaphone-0.4.1-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file kinto-megaphone-0.4.1.tar.gz.

File metadata

  • Download URL: kinto-megaphone-0.4.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for kinto-megaphone-0.4.1.tar.gz
Algorithm Hash digest
SHA256 d9bc34bd3a0a19677376c3c7e0c20a8512f904ea8e244fea2045077661bd2d4a
MD5 c708745602861b412615448e6dabe1ec
BLAKE2b-256 dd04946c24343bb1fb42b0c5a83d4b64b6e31badd179ac292b5cd40b240688f0

See more details on using hashes here.

File details

Details for the file kinto_megaphone-0.4.1-py2.py3-none-any.whl.

File metadata

  • Download URL: kinto_megaphone-0.4.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for kinto_megaphone-0.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8d0c9ec1a9af88f8a7a42e8c4df52abec296c7bd6565e2a5a3385d6eafd56777
MD5 c100b809ddb1f33dae2c42ba877b5502
BLAKE2b-256 16cfadbb420889255b0e52f67ec52efd7c79e3064f96e03ae03c1a2065bb2958

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page