Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quantum.Job.new/1 doesn't accept custom name #498

Closed
LostKobrakai opened this issue Feb 18, 2022 · 7 comments
Closed

Quantum.Job.new/1 doesn't accept custom name #498

LostKobrakai opened this issue Feb 18, 2022 · 7 comments

Comments

@LostKobrakai
Copy link
Contributor

Quantum.Job.new/1 seems to accept all fields for a job, but not the name.

@maennchen
Copy link
Member

@LostKobrakai Hm. It seems that I forgot to set @doc false on this. The idea is to use YourScheduler.new_job() and then call Quantum.Job.set_name on it. The reason for that is that the scheduler needs to pass some scheduler config to the job.

I see though that it would be nice to be able to configure all properties at once.

I'll have a look at this next week.

@LostKobrakai
Copy link
Contributor Author

I‘m using ˋMyApp.Scheduler.new_job()ˋ, but as you guessed it‘s strange to be able to pass a keyword list, if the expectation is to use the explicit API. And otoh it‘s strange to not be able to set the name via the keyword list, if that‘s intended use. Also as usual with keyword list options it‘s even a silent error you need to discover with tests.

@maennchen
Copy link
Member

@LostKobrakai What do you think of #500?

@LostKobrakai
Copy link
Contributor Author

This looks good, though today I noticed the same behaviour of :name also applies to :task. Would be great if that one could be considered as well.

@maennchen
Copy link
Member

@LostKobrakai Good point, I'll have a look, that all options are supported.

@maennchen
Copy link
Member

@LostKobrakai Updated, ok now?

@LostKobrakai
Copy link
Contributor Author

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants