mirror of
https://github.com/hibiken/asynq.git
synced 2025-04-22 16:50:18 +08:00
Update documents
This commit is contained in:
parent
d0cb51c914
commit
dc473de3ed
@ -49,7 +49,7 @@ Task queues are used as a mechanism to distribute work across multiple machines.
|
||||
|
||||
## Quickstart
|
||||
|
||||
Make sure you have Go installed ([download](https://golang.org/dl/)). Version `1.13` or higher is required.
|
||||
Make sure you have Go installed ([download](https://golang.org/dl/)). Version `1.14` or higher is required.
|
||||
|
||||
Initialize your project by creating a folder and then running `go mod init github.com/your/repo` ([learn more](https://blog.golang.org/using-go-modules)) inside the folder. Then install Asynq library with the [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) command:
|
||||
|
||||
|
4
asynq.go
4
asynq.go
@ -82,10 +82,10 @@ type TaskInfo struct {
|
||||
// zero if not applicable.
|
||||
NextProcessAt time.Time
|
||||
|
||||
// ResulTTL is the retention period after the task is successfully processed.
|
||||
// ResulTTL is duration of the retention period after the task is successfully processed.
|
||||
ResultTTL time.Duration
|
||||
|
||||
// CompletedAt is the time the task is processed successfully.
|
||||
// CompletedAt is the time when the task is processed successfully.
|
||||
// Zero value (i.e. time.Time{}) indicates no value.
|
||||
CompletedAt time.Time
|
||||
|
||||
|
@ -180,7 +180,7 @@ func (d processInOption) String() string { return fmt.Sprintf("ProcessIn(%v)
|
||||
func (d processInOption) Type() OptionType { return ProcessInOpt }
|
||||
func (d processInOption) Value() interface{} { return time.Duration(d) }
|
||||
|
||||
// ResultTTL returns an option to specify the retention period for the task.
|
||||
// ResultTTL returns an option to specify the duration of retention period for the task.
|
||||
// If this option is provided, the task will be stored as a completed task after successful processing.
|
||||
// A completed task will be deleted after the TTL expires.
|
||||
func ResultTTL(ttl time.Duration) Option {
|
||||
|
Loading…
x
Reference in New Issue
Block a user