2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-12-27 00:02:19 +08:00

fix: syntax error in readme example

This commit is contained in:
MinJae Kwon 2020-12-17 23:05:16 +09:00 committed by GitHub
parent 8d6e4167ab
commit 37dfd746d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)