ptarmiganlabs/butler-cw

Start cache warm after successful task realod

chevcheli0s opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
Some apps are updated every day at different times

Describe the solution you'd like
Is there any way to warm up the app after it reload?

Good question/idea.

Currently it's not possible.
It's however very doable, the question is what's the best way to implement it. I can think of a few options:

  1. Listen on events from the Sense engine, trying to detect when apps finish reloading. If an app that just finished reloading is also in Butler CW's config file, the app can be loaded into the server specific in Butler CW config file. The tricky part is the detection of when apps finish reloading. There are ways of doing this, all with their own caveats.
  2. Add a REST API to Butler CW. That would allow any external tool to trigger a cache warming of an app. In your case you'd still have to do that REST call though.
  3. Add a MQTT module to Butler CW. Same basic idea as the REST API but using a different transport. MQTT is awesome for pub-sub scenarios. In this case you'd publish a message to a topic such as qliksense/butler-cw/cachewarm with a message body along the lines of "appId, should sheets be stepped through" etc.
e3k commented

hi. we would also need this one. it could be done when running an external script (your PS) after app reload.
only we would need a parameter to exit butler after first run.