disbatch.pl - CLI to the Disbatch Command Interface (DCI).
version 3.990
This is deprecated as of Disbatch 4.0 and will be removed in Disbatch 4.2. Use disbatch.
disbatch.pl [<arguments>] <command> [<command arguments>]
URL for the DCI you wish to connect to. Default is http://localhost:8080.
http://localhost:8080
DCI username
DCI password
Display this message
Path to the SSL CA file. Needed if using SSL with a private CA.
Disables hostname verification if SSL is used.
Only used if --ssl_ca_file is not used.
--ssl_ca_file
Path to Disbatch config file. Default is /etc/disbatch/config.json.
/etc/disbatch/config.json
Only used if neither --ssl_ca_file nor --disable_ssl_verification is used.
--disable_ssl_verification
Note: the SSL settings in the Disbatch config file are for MongoDB, but ideally if using SSL with MongoDB, then it is also being used with the DCI.
List all queues this disbatch server processes.
$ disbatch.pl status ID | Type | Name | Threads | Done | To-Do | Processing -------------------------+------------------------+------+---------+------+-------+----------- 56eade3aeb6af81e0123ed21 | Disbatch::Plugin::Demo | demo | 0 | 0 | 0 | 0 1 total queues.
Change a field's value in a queue. The only valid field is threads.
threads
$ disbatch.pl queue set 56eade3aeb6af81e0123ed21 threads 10
Create a new queue.
$ disbatch.pl queue start Disbatch::Plugin::Demo foo New Queue #5717f5edeb6af80362796221
Creates a task in the specified queue with the given params.
$ disbatch.pl queue task 5717f5edeb6af80362796221 user1 ashley user2 ashley [1,1,{"index":0,"_id":{"$oid":"5717f70ceb6af803671f7c71"}},{"MongoDB::InsertManyResult":{"acknowledged":1,"inserted":[{"index":0,"_id":{"$oid":"5717f70ceb6af803671f7c71"}}],"write_concern_errors":[],"write_errors":[]},"success":1}]
Creates multiple tasks in the specified queue with the given params, based off a filter from another collection.
In the below example, the users collection is queried for all documents matching {migration: "foo"}. These documents are then used to set task params, and the values from the query collection are accessed by prepending document..
users
{migration: "foo"}
document.
$ disbatch.pl queue tasks 5717f5edeb6af80362796221 users migration foo -- -- user1 document.username user2 document.username migration document.migration [1,2]
Returns a JSON array of task documents matching the JSON query given. Note that blessed values may be munged to be proper JSON.
$ disbatch.pl queue search 5717f5edeb6af80362796221 '{"params.migration": "foo"}' [{"ctime":1461189920,"stderr":null,"status":-2,"mtime":0,"_id":{"$oid":"5717fd20eb6af803671f7c72"},"node":null,"params":{"migration":"foo","user1":"ashley","user2":"ashley"},"queue":{"$oid":"5717f5edeb6af80362796221"},"stdout":null,"ctime_str":"2016-04-20T22:05:20"},{"ctime":1461189920,"stderr":null,"status":-2,"mtime":0,"_id":{"$oid":"5717fd20eb6af803671f7c73"},"node":null,"params":{"migration":"foo","user1":"matt","user2":"matt"},"queue":{"$oid":"5717f5edeb6af80362796221"},"stdout":null,"ctime_str":"2016-04-20T22:05:20"}]
$ disbatch.pl queue types Disbatch::Plugin::Demo
disbatch
Disbatch
Disbatch::Web
Disbatch::Roles
Disbatch::Plugin::Demo
task_runner
disbatchd
disbatch-create-users
Ashley Willis <awillis@synacor.com>
Matt Busigin
This software is Copyright (c) 2016 by Ashley Willis.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Disbatch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Disbatch
CPAN shell
perl -MCPAN -e shell install Disbatch
For more information on module installation, please visit the detailed CPAN module installation guide.