зеркало из https://github.com/mozilla/bedrock.git
35e60ae543
* 10544: Add Contentful-SQS settings, from env vars * Update documentation re test service lacking custom env vars * 10544: Switch from polling Contentful directly to checking a message queue Prior to this changeset, the update_contentful management command would immediately pull all content from Contentful and then decide whether the local DB needed updating or not. This change was run every few minutes as part of run-db-update.sh, called by a clock process, and resulted in lots of API calls to Contentful, even though content may not have changed. This changeset now first checks an SQS message queue for a notification from Contentful (put there via a separately configured webhook at the Contentful side each time content state changes). The messages are checked and, if the indicate that a content update is worthwhile, only _then_ is the previous set of API calls triggered. The 'go' actions vary depending on whether this is in use on Dev/Stage or Prod, to allow Dev to pull in updated draft/preview content, too. Note that Dev needs a preview-compatible API key to work in DEV=True mode Also note that the --force option now does two things: * [ADDED] poll contentful regardless of queue state * [RETAINED] update stored data even if the data hash matches * 10544: Ensure we check the entire queue, not just the first 10 messages ...because our first 'go' signal might be 11+ messages deep in the queue * 10544: A little tuning of the contentful importer + add MPL atop the code * 10544: Add in tests for new contentful syncing logic * 10544: minor typing tweak * 10544: Make the update_contentful management command tolerant of absent config If either Contentful or AWS SQS config is not provisioned (eg locally, or in an environment where we currently lack SQS config), we handle things gracefully so that we do not block the rest of any script that calls this command * 10544: Remove duplicated MPL text * 10544: Back out misleading documentation change |
||
---|---|---|
.. | ||
_static | ||
_templates | ||
architecture/decisions | ||
images | ||
Makefile | ||
abtest.rst | ||
analytics.rst | ||
architectural-decisions.rst | ||
banners.rst | ||
browser-support.rst | ||
build-github.zsh | ||
coding.rst | ||
conf.py | ||
content-cards.rst | ||
contentful.rst | ||
contribute.rst | ||
download-buttons.rst | ||
firefox-accounts.rst | ||
fluent-conversion.rst | ||
funnelcake.rst | ||
index.rst | ||
install.rst | ||
javascript-libs.rst | ||
l10n.rst | ||
mozilla-lazy-load.rst | ||
newsletters.rst | ||
pipeline.rst | ||
redirects.rst | ||
send-to-device.rst | ||
stub-attribution.rst | ||
testing.rst | ||
uitour.rst |