add a message to queue fred, will be a simple queue, --type=simple is default > abq -q fred "message to tweet" # add a message to the work task queue > abq -q work --type=task "process /some/file/path" # add to a pubsub queue > abq --queue=notes --type=pubsub "started a program" # listen to all pubsub queue messages forever, messages are writen to stdout > abq --queue=notes --type=pubsub --listen # take an item from a simple queue > abq -q fred --pop # process an item in a task queue, exit status will determin if it is processed # the queue message is passed to the exec command in quotes # obviously there are security concerns around doing this, clean your inputs! > abq -q work --type=task --exec "/command/to/run" # peek at work items in a task queue, --type=task is default for a peek > abq --peek --count=10 -q work to get full help use > abq --help
Add am item to a queue or process an item from a queue
config file is in ~/.abq
abq: queue: dsn: dbi:SQLite:/tmp/abq.sqlite user: password:
The queue entry holds information about the queue database that you want to connect to, this is obviously a perl DBI style connection
To install App::Basis::Queue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Basis::Queue
CPAN shell
perl -MCPAN -e shell install App::Basis::Queue
For more information on module installation, please visit the detailed CPAN module installation guide.