mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-10 11:31:58 +08:00
fix: syntax error in readme example
This commit is contained in:
parent
8d6e4167ab
commit
37dfd746d4
@ -135,6 +135,8 @@ In your application code, import the above package and use [`Client`](https://pk
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hibiken/asynq"
|
"github.com/hibiken/asynq"
|
||||||
@ -179,7 +181,7 @@ func main() {
|
|||||||
// Options include MaxRetry, Queue, Timeout, Deadline, Unique etc.
|
// Options include MaxRetry, Queue, Timeout, Deadline, Unique etc.
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
c.SetDefaultOptions(tasks.ImageProcessing, asynq.MaxRetry(10), asynq.Timeout(3*time.Minute))
|
c.SetDefaultOptions(tasks.TypeImageResize, asynq.MaxRetry(10), asynq.Timeout(3*time.Minute))
|
||||||
|
|
||||||
t = tasks.NewImageResizeTask("some/blobstore/path")
|
t = tasks.NewImageResizeTask("some/blobstore/path")
|
||||||
res, err = c.Enqueue(t)
|
res, err = c.Enqueue(t)
|
||||||
|
Loading…
Reference in New Issue
Block a user