#!/usr/bin/env perl
use strict;
use warnings;
use Redis::Setlock;

exit Redis::Setlock->run(@ARGV);

__END__

=encoding utf-8

=for stopwords setlock

=head1 NAME

redis-setlock

=head1 SYNOPSIS

    $ redis-setlock [-nNxX] KEY program [ arg ... ]

    --redis (Default: 127.0.0.1:6379): redis-host:redis-port
    --expires (Default: 86400): The lock will be auto-released after the expire time is reached.
    --keep: Keep the lock after invoked command exited.
    -n: No delay. If KEY is locked by another process, redis-setlock gives up.
    -N: (Default.) Delay. If KEY is locked by another process, redis-setlock waits until it can obtain a new lock.
    -x: If KEY is locked, redis-setlock exits zero.
    -X: (Default.) If KEY is locked, redis-setlock prints an error message and exits nonzero.

Redis Server >= 2.6.12 is required.

=cut

