Closed darksheik closed 4 years ago
Hey Don,
Explicit matches are only supported by the Mnesia queue, the ErlangQueue implementation only takes a function. Check out the docs for more info.
Try this:
alias Honeydew.Job
:ok =
Honeydew.filter(:my_queue, fn
%Job{task: {:run, [10]}} ->
true
_ ->
false
end)
|> List.first
|> Honeydew.cancel
I found this example for clearing out a job when I know the exact arguments.
Is there any way to just whack every job in the entire queue? I've tried matching on just an empty
%{}
but it gives me anArgumentError
. In fact, the below example gives me that as well, even though it won't match my own arguments. I assume it would just tell me it doesn't match anything or return an empty list instead of the error.I'm using an
ErlangQueue
.