summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-03-02 21:07:45 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-03-02 21:07:45 +0300
commit90e8dfed8690d6e70d3c74c3ec545d06498c079e (patch)
tree1005d4bbea4c44eea8cb376ca2b5ae3af7c34ea5
parent2be11422804aaf5a088e0c5ffdba53fe1df37365 (diff)
update readme
-rw-r--r--README.md25
1 files changed, 15 insertions, 10 deletions
diff --git a/README.md b/README.md
index f6895eb..b107382 100644
--- a/README.md
+++ b/README.md
@@ -49,33 +49,38 @@ For optimization purposes, you can turn fields `target` and `slot` into `ENUM`s.
[php-jobd-client](github.com/gch1p/php-jobd-client) (official)
-## jobd requests
+## Protocol
-* **`poll(targets=[])`** — get new tasks for specified `targets` from database.
+### jobd requests
+
+* **`poll(targets=[]: string[])`** — get new tasks for specified `targets` from database.
If `targets` is empty or not specified, get tasks for all serving targets.
-* **`status`** — returns status of internal queues and memory usage.
+* **`status()`** — returns status of internal queues and memory usage.
-* **`run-manual(id)`** — enqueue and run job with specified `id` and `status` set to
- `manual` and return results.
+* **`run-manual(ids: int[])`** — enqueue and run jobs with specified IDs and
+ `status` set to `manual`, and return results.
-## jobd-master requests
+### jobd-master requests
-* **`register-worker(targets)`** — used by a jobd instance to register itself
+* **`register-worker(targets: string[])`** — used by a jobd instance to register itself
with master. You don't need it.
-* **`poke(targets)`** — send `poll` requests to all registered workers that serve
+* **`poke(targets: string[])`** — send `poll` requests to all registered workers that serve
specified `targets`.
-* **`status`** — returns list of registered workers and memory usage.
+* **`status()`** — returns list of registered workers and memory usage.
+
+* **`run-manual(jobs: {id: int, target: string}[])`** — send `run-manual`
+ requests to registered jobd instances serving specified targets, and return
+ results.
## TODO
**jobd**:
- `pause(targets)` / `continue(targets)`
-- `run-manual` with multiple jobs
**jobd-master**:
- `status(workers=true)`