fredlock

Distributed Locking for command line apps using Redis Redlock algorithm

Build Status Coverage Status PyPI version

fredlock

fredlock - Redis RedLock based distributed locking tool

fredlock distributed locking utility

fredlock is a distributed locking tool based on Redis RedLock algorithm intended as a replacement for “flock” command line utility, it allows to run commands on multiple machines with a guarantee that no two instances will be running at the same time.

fredlock requires a shared Redis instance to provide locking

Release Notes

TODOs:

Some other ideas/desired features:

Installation

From PyPi:

pip install fredlock

Usage

Full build-in usage is available with --help flag.

Run command with automatically-generated name lock

Simplest usage to run a command command arg1 arg2 with lock command:

fredlock run command arg1 arg2

Run command with a specified name lock

Simplest usage to run a command command arg1 arg2 with lock lockname:

fredlock --name lockname run command arg1 arg2