rq / rq-scheduler

A lightweight library that adds job scheduling capabilities to RQ (Redis Queue)
MIT License
1.45k stars 230 forks source link

Add optional job descriptions to enqueue_at and enqueue_in #171

Closed bw closed 6 years ago

bw commented 7 years ago

All the other functions also take the description kwarg except for enqueue_at and enqueue_in, so in this PR I added the field as job_description (in keeping with the other kwargs).

I also added a clarifying comment that the functions will swallow the kwargs that are used to create the job itself. Someone on our team noted this and I thought it would be helpful to note-- however there is no change in the behavior itself, just documenting it :)

selwin commented 6 years ago

Thanks!

bw commented 6 years ago

@selwin totally agree re: the argument names.

I actually had the thought that popping kwargs out based on their name is a bit confusing. I think what would be best is a enqueue_job_at that takes kwargs func, args, and kwargs the same way the native RQ job.create works. This way, there is no mixing of function kwargs and RQ Scheduler kwargs. I may implement this later.

Can you push a release with these changes? That would allow us to come back to the pip version instead of our own repository version.

selwin commented 6 years ago

@bw I'll do so shortly after https://github.com/rq/rq-scheduler/pull/174 is merged in.