I’m using the Toniq library and at the moment, I started getting this error:
Error in process <0.2371.0> on node 'name_project@xxx.xxx.xxx.xxx' with exit value:
{badarg,[{erlang,apply,[[{data,#{}}],max_concurrency,[]],[]},{'Elixir.Toniq.JobConcurrencyLimiter',run,1,[{file,"lib/ toniq/job_concurrency_limiter.ex"},{line,23}]},{'Elixir.Toniq.JobRunner','-handle_cast/2-fun-0-',1,[{file,"lib/toniq/job_runner. ex"},{line,21}]}]}
I’ve searched how to fix the error, but I can’t find anything. What can you do to fix the error? Thank you.
defmodule BackgroundProcessWorker do
@moduledoc false
use Toniq.Worker, max_concurrency: 1
require Monad.Error, as: Error
import Failed
require Logger
def perform(data: data) do
...
end
end
And here I create the jobs
def basic_deliver(_a, payload) do
Error.m do
data <- Poison.decode(payload)
return(Toniq.enqueue(BackgroundProcessWorker, data: data))
end
...
end