Skip to content

Commit 7ca3312

Browse files
authored
Fix Logs for invalid jobs (#601)
1 parent ffeabe3 commit 7ca3312

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/quantum.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,14 @@ defmodule Quantum do
320320
cond do
321321
duplicate_job?(Map.keys(acc), job) ->
322322
Logger.warning(
323-
"Job with name '#{name}' of scheduler '#{scheduler}' not started: duplicate job name"
323+
"Job with name #{inspect(name)} of scheduler #{inspect(scheduler)} not started: duplicate job name"
324324
)
325325

326326
acc
327327

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

333333
acc

test/quantum_startup_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ defmodule QuantumStartupTest do
5656
end)
5757

5858
assert log =~
59-
"Job with name 'inexistent_function' of scheduler 'Elixir.QuantumStartupTest.Scheduler' not started: invalid task function"
59+
"Job with name :inexistent_function of scheduler QuantumStartupTest.Scheduler not started: invalid task function"
6060
end
6161
end

0 commit comments

Comments
 (0)