alphagov/signonotron2 — pull request #205 by vinayvinay (2014-02-13 11:35:46+00:00)
Title: Fix for organisations:fetch parallel runs

Errbit [reported](https://errbit.preview.alphagov.co.uk/apps/52e678360da1158195000002/problems/52fc354f0da1151c9c00017c) duplicates being inserted
into the Signon organisations table.

Given that organisation slugs are unique
the only possible reason why this is happening
is because the task is running from all backend
machines where cron is configured with this task.

This change ensures we obtain a lock, that expires
in 10 minutes, before running this task, so that
only one task fetches organisation info, and the
rest skip because they didn't obtain a lock.