tcwg-llvmbot monitor: Add caching at the point after status is read
So originally I was going to cache all the API responses as JSON,
which would be great if we want to test this thing more later, however:
1. Buildkite uses a wrapper library, so it'd take some hacking.
2. JSON can't encode anything but strings as keys.
So instead I've cached the status data using Python's pickle
just after we've read from both sources. This means you can test
changes to the HTML generation in seconds.
Disadvantge being that the pickle object can't be hand constructed.
Switching to JSON or YAML would mean we have to change a bunch of our
keys though, so I don't see the point in that at the moment.
There is one new optional option, --cachefile. If the path exists,
load from it, if it doesn't read the status and save to it.
Change-Id: I45e6edc875271bf258f66655e03d933cbbf02dee
1 file changed