servicelock - Interface to App::OverWatch DB locks
version 0.1
servicelock [OPTIONS] COMMAND Commands: --check --create_lock --create_table --force_unlock --list --lock --print --unlock --update Options: --system --worker --text --expiry --help --verbose
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.
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
notify, eventlog
Chris Hughes <chrisjh@cpan.org>
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.
To install App::OverWatch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::OverWatch
CPAN shell
perl -MCPAN -e shell install App::OverWatch
For more information on module installation, please visit the detailed CPAN module installation guide.