NAME
servicelock - Interface to App::OverWatch DB locks
VERSION
version 0.1
SYNOPSIS
servicelock [OPTIONS] COMMAND
Commands:
--check
--create_lock
--create_table
--force_unlock
--list
--lock
--print
--unlock
--update
Options:
--system
--worker
--text
--expiry
--help
--verbose
DESCRIPTION
servicelock is used to create and manipulate locks in a backend database. It provides a simple example interface to the Perl App::OverWatch::ServiceLock module.
EXAMPLE
Create the ServiceLock table 'servicelocks':
# servicelock --create_table
Create a lock named 'global':
# servicelock --create_lock --system global
Check whether 'global' is locked (flagged by exit status):
# servicelock --check --system global
Attempt to lock the 'global' lock:
# servicelock --lock --system global --worker myworkerid --text 'testing lock'
# servicelock --lock --system global --worker myworkerid --text 'testing lock' --expiry 60
Unlock:
# servicelock --unlock --system global --worker myworkerid
Force an unlock
# servicelock --force_unlock --system global
Print details about a lock:
# servicelock --print --system global
List all available locks:
# servicelock --list
SEE ALSO
AUTHOR
Chris Hughes <chrisjh@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Chris Hughes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.