You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: refactor queue management and improve task handling
- Add the `log` package to imports
- Remove `github.com/appleboy/graceful` from imports
- Alias `github.com/golang-queue/rabbitmq` as `rabbitmq` in imports
- Reduce `taskN` from 10000 to 100
- Remove the use of `graceful.NewManager()`
- Remove `rabbitmq.WithExchangeType(*exchangeType)` from the worker configuration
- Remove the `time.Sleep(500 * time.Millisecond)` call in the worker function
- Change queue initialization to use `queue.NewQueue` with a worker count of 5
- Add error handling for queue initialization
- Add code to start the queue with five workers
- Replace `graceful` job management with direct task assignment to the queue
- Add a loop to wait until all tasks are done, printing messages and sleeping for 50 milliseconds between each
Signed-off-by: appleboy <[email protected]>
0 commit comments