Skip to content

Commit 9aa3f0c

Browse files
Fix shutdown order of worker and enqueuer (#501)
Enqueuer should be started before worker and shutdown after worker, as worker drainer might keep the worker process alive for `shutdown_timeout` and during that period, any enqueue operation inside the worker process will fail
1 parent a6b020b commit 9aa3f0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/exq/support/mode.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ defmodule Exq.Support.Mode do
3131
worker(Exq.Middleware.Server, [opts]),
3232
worker(Exq.Stats.Server, [opts]),
3333
worker(Exq.Node.Server, [opts]),
34+
worker(Exq.Enqueuer.Server, [opts]),
3435
supervisor(Exq.Worker.Supervisor, [opts]),
3536
worker(Exq.Manager.Server, [opts]),
3637
worker(Exq.WorkerDrainer.Server, [opts], shutdown: shutdown_timeout),
37-
worker(Exq.Enqueuer.Server, [opts]),
3838
worker(Exq.Api.Server, [opts])
3939
]
4040

0 commit comments

Comments
 (0)