mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-10 11:31:58 +08:00
Fix readme
This commit is contained in:
parent
421dc584ff
commit
3ae0e7f528
@ -215,7 +215,7 @@ func main() {
|
|||||||
|
|
||||||
info, err = client.Enqueue(task, asynq.Queue("critical"), asynq.Timeout(30*time.Second))
|
info, err = client.Enqueue(task, asynq.Queue("critical"), asynq.Timeout(30*time.Second))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("could not enqueue task: %v", err)
|
log.Fatalf("could not enqueue task: %v", err)
|
||||||
}
|
}
|
||||||
log.Printf("enqueued task: id=%s queue=%s", info.ID, info.Queue)
|
log.Printf("enqueued task: id=%s queue=%s", info.ID, info.Queue)
|
||||||
}
|
}
|
||||||
@ -239,7 +239,7 @@ const redisAddr = "127.0.0.1:6379"
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
srv := asynq.NewServer(
|
srv := asynq.NewServer(
|
||||||
asynq.RedisClientOpt{Addr: redisAddr}
|
asynq.RedisClientOpt{Addr: redisAddr},
|
||||||
asynq.Config{
|
asynq.Config{
|
||||||
// Specify how many concurrent workers to use
|
// Specify how many concurrent workers to use
|
||||||
Concurrency: 10,
|
Concurrency: 10,
|
||||||
|
Loading…
Reference in New Issue
Block a user