Added the logic to handle a failed attempt to get the lock 10 times in a row
Sleeping to give the local dynamo enough time to start