asynq
asynq copied to clipboard
What does Asynq Logs Signify?
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 $$$$$)