Skip to content

Instantly share code, notes, and snippets.

@d00rman
Last active November 11, 2015 15:23
Show Gist options
  • Save d00rman/217560aa9c73551db216 to your computer and use it in GitHub Desktop.
Save d00rman/217560aa9c73551db216 to your computer and use it in GitHub Desktop.
Change Propagation Config
---
# rule name
refresh-html:
# the topic to watch for
topic: mw-page-edit
# the modules to call when a message arrives there
exec:
# call the request module and pass in the params it expects
- request:
uri: http://restbase.svc.eqiad.wmnet:7231/{$.message.event.domain}/v1/page/html/{$.message.title}/{$.message.revision}
method: get
headers:
cache-control: no-cache
# call the purge module as well (in parallel)
purge:
uri:
- https://{$.message.event.domain}/api/rest_v1/page/html/{$.message.title}/{$.message.revision}
# only after request and purge have been completed, enqueue a new message
- enqueue:
topic: rb-html-change
message:
event: '{$.message.event}'
title: '{$.message.title}'
revision: '{$.message.revision}'
refresh-mobileapps:
topic: rb-html-change
exec:
- purge:
uri:
- https://{$.message.event.domain}/api/rest_v1/page/mobile-html-sections/{$.message.title}
- https://{$.message.event.domain}/api/rest_v1/page/mobile-html-sections-lead/{$.message.title}
- https://{$.message.event.domain}/api/rest_v1/page/mobile-html-sections-remaining/{$.message.title}
- request:
uri: http://restbase.svc.eqiad.wmnet:7231/{$.message.event.domain}/v1/page/mobile-html-sections/{$.message.title}
method: get
headers:
cache-control: no-cache
- request:
uri: http://restbase.svc.eqiad.wmnet:7231/{$.message.event.domain}/v1/page/mobile-html-sections-lead/{$.message.title}
method: get
headers:
cache-control: no-cache
- request:
uri: http://restbase.svc.eqiad.wmnet:7231/{$.message.event.domain}/v1/page/mobile-html-sections-remaining/{$.message.title}
method: get
headers:
cache-control: no-cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment