[GH-ISSUE #521] What does Asynq Logs Signify? #242

Open
opened 2026-03-02 05:19:53 +03:00 by kerem · 0 comments
Owner

Originally created by @lovgrandma on GitHub (Jul 18, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/521

I have a job queue for video processing and batch SMS sends.
It works but I want to be more clear on what the logs mean. When my server starts I run this in main()

go sms_workers.BuildWorkerServer()   // Server for SMS job queue
go video_workers.BuildWorkerServer() // Server for video job queue

Both run this code:

func BuildWorkerServer() { srv := asynq.NewServer( asynq.RedisClientOpt{Addr: jobQueueAddr}, asynq.Config{ Concurrency: 10, // total concurrent workers Queues: map[string]int{ "critical": 6, "default": 3, "low": 1, }, }, ) mux := asynq.NewServeMux() mux.HandleFunc(video_queue.TypeVideoProcess, video_queue.HandleVideoProcessTask) if err := srv.Run(mux); err != nil { log.Printf("Could not run Job Queue Server: %v", err) } }

I see this in my log:

asynq: pid=41428 2022/07/16 22:27:11.256248 INFO: Starting processing
asynq: pid=41428 2022/07/16 22:27:11.256248 INFO: Starting processing
asynq: pid=41428 2022/07/16 22:27:11.257265 INFO: Send signal TERM or INT to terminate the process
asynq: pid=41428 2022/07/16 22:27:11.256762 INFO: Send signal TERM or INT to terminate the process

Please advise. I am running each server using go routines so Im thinking the pid's should be different? The goal is for concurrency in this scenario. Havent faced any issues but I havent tested for scale (in interest of money, each process is expensive as it is connected to AWS Rekognition $)

Originally created by @lovgrandma on GitHub (Jul 18, 2022). Original GitHub issue: https://github.com/hibiken/asynq/issues/521 I have a job queue for video processing and batch SMS sends. It works but I want to be more clear on what the logs mean. When my server starts I run this in main() ``` go sms_workers.BuildWorkerServer() // Server for SMS job queue go video_workers.BuildWorkerServer() // Server for video job queue ``` Both run this code: ` func BuildWorkerServer() { srv := asynq.NewServer( asynq.RedisClientOpt{Addr: jobQueueAddr}, asynq.Config{ Concurrency: 10, // total concurrent workers Queues: map[string]int{ "critical": 6, "default": 3, "low": 1, }, }, ) mux := asynq.NewServeMux() mux.HandleFunc(video_queue.TypeVideoProcess, video_queue.HandleVideoProcessTask) if err := srv.Run(mux); err != nil { log.Printf("Could not run Job Queue Server: %v", err) } } ` I see this in my log: ``` asynq: pid=41428 2022/07/16 22:27:11.256248 INFO: Starting processing asynq: pid=41428 2022/07/16 22:27:11.256248 INFO: Starting processing asynq: pid=41428 2022/07/16 22:27:11.257265 INFO: Send signal TERM or INT to terminate the process asynq: pid=41428 2022/07/16 22:27:11.256762 INFO: Send signal TERM or INT to terminate the process ``` Please advise. I am running each server using go routines so Im thinking the pid's should be different? The goal is for concurrency in this scenario. Havent faced any issues but I havent tested for scale (in interest of money, each process is expensive as it is connected to AWS Rekognition $$$$$)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#242
No description provided.