From f65d408bf9bae8defb71b328212ad4b8ab378e2e Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Mon, 8 Jun 2020 06:15:45 -0700 Subject: [PATCH] Update docs for pause feature --- CHANGELOG.md | 4 ++++ README.md | 1 + tools/asynq/README.md | 12 ++++++++++++ 3 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6676d7..0712033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- The `pause` and `unpause` commands were added to the CLI. See README for the CLI for details. + ## [0.9.1] - 2020-05-29 ### Added diff --git a/README.md b/README.md index d84fc2d..44899ee 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ A system can consist of multiple worker servers and brokers, giving way to high - De-duplication of tasks using [unique option](https://github.com/hibiken/asynq/wiki/Unique-Tasks) - Allow [timeout and deadline per task](https://github.com/hibiken/asynq/wiki/Task-Timeout-and-Cancelation) - [Flexible handler interface with support for middlewares](https://github.com/hibiken/asynq/wiki/Handler-Deep-Dive) +- [Ability to pause queue](/tools/asynq/README.md#pause) to stop processing tasks from the queue - [Support Redis Sentinels](https://github.com/hibiken/asynq/wiki/Automatic-Failover) for HA - [CLI](#command-line-tool) to inspect and remote-control queues and tasks diff --git a/tools/asynq/README.md b/tools/asynq/README.md index a81bfbe..1df21ce 100644 --- a/tools/asynq/README.md +++ b/tools/asynq/README.md @@ -14,6 +14,7 @@ Asynq CLI is a command line tool to monitor the tasks managed by `asynq` package - [Delete](#delete) - [Kill](#kill) - [Cancel](#cancel) + - [Pause](#pause) - [Config File](#config-file) ## Installation @@ -144,6 +145,17 @@ Example: asynq cancel bnogo8gt6toe23vhef0g +### Pause + +Command `pause` pauses the spcified queue. Tasks in paused queues are not processed by servers. +To resume processing from the queue, use `unpause` command. +To see which queues are currently paused, use `stats` command. + +Example: + + asynq pause email + asynq unpause email + ## Config File You can use a config file to set default values for the flags.