quantum-elixir / quantum-core

:watch: Cron-like job scheduler for Elixir
https://hexdocs.pm/quantum/
Apache License 2.0
2.28k stars 148 forks source link

fix logging for unnamed jobs #602

Closed maxpohlmann closed 4 months ago

maxpohlmann commented 4 months ago

When configuring Quantum with unnamed jobs (e.g. config :your_app, YourApp.Scheduler, jobs: [{"@daily", {Backup, :backup, []}}]), then the name is a Reference, which can't be printed using #{name} as was previously done, so if there is a problem with the job (e.g. the function does not exist), this leads to an error that stops the application from starting rather than just a warning in the log. This PR fixes this by adding a function job_name_to_string/1 that can handle References.

maennchen commented 4 months ago

Thanks @maxpohlmann for your PR.

I however already fixed and released this. (#601)

I‘ll therefore close your PR.

maxpohlmann commented 4 months ago

Oh haha, what a coincidence, I totally missed that. Thank you!