mysociety/yournextmp-popit — pull request #109 by mhl (2014-12-12 16:09:24+00:00)
Title: Add workaround for sometimes getting stale information from PopIt

There seems to be some situation (which I haven't yet managed to
reproduce in a minimal test case) where we get back out-of-date
information from PopIt when redirecting back to a person's page after
updating them. This commit tries to work around that by retrying the
GET up to 5 times if we get inconsistent data back. It adds a retry
query parameter on any retries so that it'll be clear from the PopIt and
varnish logs that these are the retries.

This should stop people getting confusing 500 errors from the exception,
provide more information in the logs and reduce the amount of error
email we get, so it seems like a reasonable second-best to fixing the
underlying problem.

This is a workaround for issue #57