A robust algorithm for a distributed lock on google cloud storage written in Python.
This algorithm is based on this article.
The basic parameters are:
- ttl: how long a lock will be considered active
- refresh_interval: how often the daemon will update the expiration timestamp on the file lock
- max_refresh_failures: how many times will the daemon retry to update the lock metadata in case of an error
- identity: the process id, needs to be unique across the different processes that want to acquire the lock