Mikaelemmmm / go-zero-looklook

🔥基于go-zero(go zero) 微服务全技术栈开发最佳实践项目。Develop best practice projects based on the full technology stack of go zero (go zero) microservices.
https://go-zero.dev
MIT License
4.41k stars 824 forks source link

Asynq doesn't listen on any port ! #153

Open codecoron opened 2 months ago

codecoron commented 2 months ago

Hi

In mqueue scheduler and mqueue job which base on asynq doesn't listen on any port. Actually other process enqueue task by redis indircetly.

Should it removed ?

https://github.com/Mikaelemmmm/go-zero-looklook/blob/4d9cc0b3738cfbbf7fde5d3dc51ea2fecaab29d1/app/mqueue/cmd/scheduler/etc/mqueue.yaml#L3

https://github.com/Mikaelemmmm/go-zero-looklook/blob/4d9cc0b3738cfbbf7fde5d3dc51ea2fecaab29d1/app/mqueue/cmd/job/etc/mqueue.yaml#L3

Name: mqueue-scheduler
Host: 0.0.0.0
# Port: 3003
Mode: dev
Name: mqueue-job
Host: 0.0.0.0
# Port: 3002 
Mode: dev

My Test Here

./data/server/mqueue-scheduler -f app/mqueue/cmd/scheduler/etc/mqueue.yaml
【LotteryDrawScheduler】 registered an entry: "91303128-7318-4103-8c3e-afd41aff775b" 
【wishCheckinScheduler】 registered an entry: "443241d0-a083-465c-b0b4-5bd35ade272c" 
asynq: pid=1624910 2024/08/27 02:16:42.839388 INFO: Scheduler starting
asynq: pid=1624910 2024/08/27 02:16:42.839396 INFO: Scheduler timezone is set to Asia/Shanghai
asynq: pid=1624910 2024/08/27 02:16:42.839405 INFO: Send signal TERM or INT to stop the scheduler

No process listen on 3003

# lsof -i:3003
# 
Mikaelemmmm commented 2 weeks ago

Yes, the port is useless. It's like a message queue.