mirror of
https://github.com/hibiken/asynq.git
synced 2025-09-19 05:17:30 +08:00
Return Result struct to caller of Enqueue
This commit is contained in:
4
doc.go
4
doc.go
@@ -25,10 +25,10 @@ Task is created with two parameters: its type and payload.
|
||||
map[string]interface{}{"user_id": 42})
|
||||
|
||||
// Enqueue the task to be processed immediately.
|
||||
err := client.Enqueue(t)
|
||||
res, err := client.Enqueue(t)
|
||||
|
||||
// Schedule the task to be processed after one minute.
|
||||
err = client.EnqueueIn(time.Minute, t)
|
||||
res, err = client.EnqueueIn(time.Minute, t)
|
||||
|
||||
The Server is used to run the background task processing with a given
|
||||
handler.
|
||||
|
Reference in New Issue
Block a user