NAME

disbatch.pl - CLI to the Disbatch Command Interface (DCI).

VERSION

version 3.990

DEPRECATION NOTICE

This is deprecated as of Disbatch 4.0 and will be removed in Disbatch 4.2. Use disbatch.

SYNOPSIS

disbatch.pl [<arguments>] <command> [<command arguments>]

ARGUMENTS

--url <URL>

URL for the DCI you wish to connect to. Default is http://localhost:8080.

--username <username>

DCI username

--password <password>

DCI password

--help

Display this message

--ssl_ca_file <ssl_ca_file>

Path to the SSL CA file. Needed if using SSL with a private CA.

--disable_ssl_verification

Disables hostname verification if SSL is used.

Only used if --ssl_ca_file is not used.

--config <config_file>

Path to Disbatch config file. Default is /etc/disbatch/config.json.

Only used if neither --ssl_ca_file nor --disable_ssl_verification is used.

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.

COMMANDS

status

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.
queue set <queue> <key> <value>

Change a field's value in a queue. The only valid field is threads.

$ disbatch.pl queue set 56eade3aeb6af81e0123ed21 threads 10
queue start <type> <name>

Create a new queue.

$ disbatch.pl queue start Disbatch::Plugin::Demo foo
New Queue #5717f5edeb6af80362796221
queue task <queue> [<key> <value> ...]

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}]
queue tasks <queue> <collection> [<filter key> <value> ...] -- -- [<param key> <value> ...]

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..

$ disbatch.pl queue tasks 5717f5edeb6af80362796221 users migration foo -- -- user1 document.username user2 document.username migration document.migration
[1,2]
queue search <queue> <json_query>

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"}]

queue types
$ disbatch.pl queue types
Disbatch::Plugin::Demo

SEE ALSO

disbatch

Disbatch

Disbatch::Web

Disbatch::Roles

Disbatch::Plugin::Demo

task_runner

disbatchd

disbatch-create-users

AUTHORS

Ashley Willis <awillis@synacor.com>

Matt Busigin

COPYRIGHT AND LICENSE

This software is Copyright (c) 2016 by Ashley Willis.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004