machinery
machinery copied to clipboard
worker hangs when receive signal interrupt
Starts a worker with a wrong broker and the worker retried, but if sends the signal interrupt, the worker still retried and didn't quit and hangs. There is no task to be executed since the broker is invalid.
INFO: 2019/03/11 21:56:02 worker.go:46 Launching a worker with the following settings:
INFO: 2019/03/11 21:56:02 worker.go:47 - Broker: redis://127.0.0.1:6378
INFO: 2019/03/11 21:56:02 worker.go:49 - DefaultQueue: test_queue
INFO: 2019/03/11 21:56:02 worker.go:53 - ResultBackend: mongodb://localhost
WARNING: 2019/03/11 21:56:02 worker.go:71 Broker failed with error: dial tcp 127.0.0.1:6378: connect: connection refused
WARNING: 2019/03/11 21:56:02 retry.go:20 Retrying in 1 seconds
WARNING: 2019/03/11 21:56:03 worker.go:71 Broker failed with error: dial tcp 127.0.0.1:6378: connect: connection refused
WARNING: 2019/03/11 21:56:03 retry.go:20 Retrying in 1 seconds
WARNING: 2019/03/11 21:56:04 worker.go:71 Broker failed with error: dial tcp 127.0.0.1:6378: connect: connection refused
WARNING: 2019/03/11 21:56:04 retry.go:20 Retrying in 2 seconds
WARNING: 2019/03/11 21:56:06 worker.go:71 Broker failed with error: dial tcp 127.0.0.1:6378: connect: connection refused
WARNING: 2019/03/11 21:56:06 retry.go:20 Retrying in 3 seconds
WARNING: 2019/03/11 21:56:09 worker.go:71 Broker failed with error: dial tcp 127.0.0.1:6378: connect: connection refused
WARNING: 2019/03/11 21:56:09 retry.go:20 Retrying in 5 seconds
WARNING: 2019/03/11 21:56:10 worker.go:89 Signal received: interrupt
WARNING: 2019/03/11 21:56:10 worker.go:94 Waiting for running tasks to finish before shutting down
WARNING: 2019/03/11 21:56:14 worker.go:71 Broker failed with error: dial tcp 127.0.0.1:6378: connect: connection refused
WARNING: 2019/03/11 21:56:14 retry.go:20 Retrying in 8 seconds
WARNING: 2019/03/11 21:56:22 worker.go:71 Broker failed with error: dial tcp 127.0.0.1:6378: connect: connection refused
WARNING: 2019/03/11 21:56:22 retry.go:20 Retrying in 13 seconds
WARNING: 2019/03/11 21:56:35 worker.go:71 Broker failed with error: dial tcp 127.0.0.1:6378: connect: connection refused
WARNING: 2019/03/11 21:56:35 retry.go:20 Retrying in 21 seconds
WARNING: 2019/03/11 21:56:56 worker.go:71 Broker failed with error: dial tcp 127.0.0.1:6378: connect: connection refused
WARNING: 2019/03/11 21:56:56 retry.go:20 Retrying in 34 seconds
@tinycolds This is also happening with me, Did you find any solution?
This is still happening with me, although in my case I started with the right configurations. After running for awhile, I pressed Ctrl + C and it's just hanging.