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
I think the problem is the worker process already completes before the Process.monitor is installed. In this case Erlang sends DOWN with info set to :noproc (and that's the error seen in failure too, since failure is handled by the second DOWN handling function in lib/que/server.ex
def handle_info({:DOWN, ref, :process, _pid, :normal}, queue) do
def handle_info({:DOWN, ref, :process, _pid, err}, queue) do
I fixed it by add this function (between the two above) and then handling it as success. def handle_info({:DOWN, ref, :process, _pid, :noproc}, queue) do
Note the :noproc
I'd submit a pull request, but I don't think this is a good way to fix it, because the Worker might have failed. Is it possible to somehow do the Process.monitor at the same time the Worker is spawned, like spawn_monitor?
The text was updated successfully, but these errors were encountered:
If I have a trivial Worker i.e. it completes really fast, then sometimes it will fail, when really it is a success. Here's my worker:
I think the problem is the worker process already completes before the Process.monitor is installed. In this case Erlang sends DOWN with info set to :noproc (and that's the error seen in failure too, since failure is handled by the second DOWN handling function in
lib/que/server.ex
I fixed it by add this function (between the two above) and then handling it as success.
def handle_info({:DOWN, ref, :process, _pid, :noproc}, queue) do
Note the
:noproc
http://erlang.org/doc/man/erlang.html#monitor-2
I'd submit a pull request, but I don't think this is a good way to fix it, because the Worker might have failed. Is it possible to somehow do the Process.monitor at the same time the Worker is spawned, like
spawn_monitor
?The text was updated successfully, but these errors were encountered: