albrow / jobs

A persistent and flexible background jobs library for go.
MIT License
499 stars 47 forks source link

Reschedule with freq #17

Open epelc opened 9 years ago

epelc commented 9 years ago

Currently Reschedule() only allows you to set the start time. It doesn't let you change the frequency which means I need to destroy the original job and create a new one. This is more error prone and slower because I need to update reference job id's in my db to do this. It might also be a good idea to let us change a job's retry count.

albrow commented 9 years ago

@epelc thank you. To keep the API consistent and preserve backwards compatibility, I'll add a RescheduleRecurring method. So then we'll have Schedule and ScheduleRecurring which are methods on job.Type and Reschedule and RescheduleRecurring which are methods on job.Job. Targeting this for 0.3.1.

epelc commented 9 years ago

@albrow Thanks!