Skip to content

Commit

Permalink
Fix Logs for invalid jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Feb 28, 2024
1 parent ffeabe3 commit 561cd08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/quantum.ex
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,14 @@ defmodule Quantum do
cond do
duplicate_job?(Map.keys(acc), job) ->
Logger.warning(
"Job with name '#{name}' of scheduler '#{scheduler}' not started: duplicate job name"
"Job with name #{inspect(name)} of scheduler #{inspect(scheduler)} not started: duplicate job name"
)

acc

invalid_job_task?(job) ->
Logger.warning(
"Job with name '#{name}' of scheduler '#{scheduler}' not started: invalid task function"
"Job with name #{inspect(name)} of scheduler #{inspect(scheduler)} not started: invalid task function"
)

acc
Expand Down
2 changes: 1 addition & 1 deletion test/quantum_startup_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ defmodule QuantumStartupTest do
end)

assert log =~
"Job with name 'inexistent_function' of scheduler 'Elixir.QuantumStartupTest.Scheduler' not started: invalid task function"
"Job with name :inexistent_function of scheduler QuantumStartupTest.Scheduler not started: invalid task function"
end
end

0 comments on commit 561cd08

Please sign in to comment.