-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
任务过期时间 | ||
============== | ||
|
||
目前只支持在client端设置过期时间,若任务发生重试且重试开始的时间超过了过期时间,任务会直接终止 | ||
|
||
.. code:: go | ||
taskId, err :=client.SetTaskCtl(client.ExpireTime,time.Now().Add(4*time.Second)).Send("group1","add",12,33) | ||
result, _ := client.GetResult(taskId, 2*time.Second, 300*time.Millisecond) | ||
if result.Status == message.ResultStatus.Expired{ | ||
// do ... | ||
} | ||