Source File
client.go
Belonging Package
github.com/pancsta/asyncmachine-go/examples/asynq_fileprocessing/client
package mainimport (tasks)const redisAddr = "127.0.0.1:6379"func main() {:= asynq.NewClient(asynq.RedisClientOpt{Addr: redisAddr})defer .Close(), := tasks.NewFileProcessingTask("foo.txt")if != nil {log.Fatalf("could not create task: %v", )}, := .Enqueue()if != nil {log.Fatalf("could not enqueue task: %v", )}log.Printf("enqueued task: id=%s queue=%s", .ID, .Queue)}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |