refactor(credo): Refactor to appease new credo checks (complexity and logging)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-04-19 18:33:06 +02:00
parent 8141bb0acb
commit eda2761032
13 changed files with 169 additions and 132 deletions

View File

@@ -48,9 +48,7 @@ defmodule Mobilizon.Service.Workers.Helper do
queue_atom = String.to_existing_atom(unquote(queue))
worker_args = worker_args ++ Helper.worker_args(queue_atom)
unquote(caller_module)
|> apply(:new, [params, worker_args])
|> Oban.insert()
Oban.insert(unquote(caller_module).new(params, worker_args))
end
end
end