From bf31fcc3ecc16362c46236dcfebba30bbc111ac2 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Wed, 12 Feb 2020 18:11:59 -0800 Subject: [PATCH] [ci skip] Update readme and changelog --- CHANGELOG.md | 9 +++++++++ README.md | 2 -- tools/asynqmon/README.md | 13 +++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7de289e..5fdc803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- `Handler` interface has changed. `ProcessTask` method takes two arguments `context.Context` and `*asynq.Task` + +### Added + +- `Client` can optionally schedule task with `asynq.Timeout(duration)` to specify timeout duration for task. Default is no timeout. +- `asynqmon cancel [task id]` will send a cancelation signal to the goroutine processing the speicified task. + ## [0.3.0] - 2020-02-04 ### Added diff --git a/README.md b/README.md index 4cf71d7..28dbc85 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,6 @@ It is backed by Redis and it is designed to have a low barrier to entry. It shou **Important Note**: Current major version is zero (v0.x.x) to accomodate rapid development and fast iteration while getting early feedback from users. The public API could change without a major version update before v1.0.0 release. -[Quick Tour of Asynq (YouTube video)](https://www.youtube.com/watch?v=FzMJdddNcmA&t=62s) - ![Gif](/docs/assets/demo.gif) ## Installation diff --git a/tools/asynqmon/README.md b/tools/asynqmon/README.md index 56dfcc4..49f1b2c 100644 --- a/tools/asynqmon/README.md +++ b/tools/asynqmon/README.md @@ -13,6 +13,7 @@ Asynqmon is a command line tool to monitor the tasks managed by `asynq` package. - [Enqueue](#enqueue) - [Delete](#delete) - [Kill](#kill) + - [Cancel](#cancel) - [Config File](#config-file) ## Installation @@ -133,6 +134,18 @@ Example: Running the above command will move all **Retry** tasks to **Dead** state. +### Cancel + +Command `cancel` takes a task ID and sends a cancelation signal to the goroutine processing the specified task. +You can obtain the task ID by running `ls` command. + +The task should be in "in-progress" state. +Handler implementation needs to be context aware in order to actually stop processing. + +Example: + + asynqmon cancel bnogo8gt6toe23vhef0g + ## Config File You can use a config file to set default values for the flags.