resque-scheduler icon indicating copy to clipboard operation
resque-scheduler copied to clipboard

Fix before/after_schedule hooks not called when enqueued with config

Open jweir opened this issue 6 years ago • 2 comments

jweir avatar Jul 08 '19 22:07 jweir

@iloveitaly hi there (I came across this after finding https://github.com/resque/resque-scheduler/issues/679)

I've got a scheduled job that needs to behave differently (not enqueue as configured, but kick off a separate class of the job instead) depending on some runtime variables (eg. feature flag). The before_schedule hook seems to fit the bill, but doesn't work. These changes ~appear to~ fix it - I know it's been some time, but any chance this could move forward? Or should I address your requested changes on a separate PR?

codealchemy avatar Oct 16 '24 22:10 codealchemy

@PatrickTulskie (seeing as this PR is quite out of date, wanted to get it back on the radar for consideration) 🙏

codealchemy avatar Oct 17 '24 16:10 codealchemy

@codealchemy Happy to get this one merged in since it does seem like it fixes an actual bug. It would be nice to get this branch rebased with master so that CI runs for it. I can handle the changelog updates when I do a release. Also possible that given how old this is, the PR might have to be adjusted. If you want to open a fresh PR and take over work on it, then go for it.

PatrickTulskie avatar Oct 25 '24 01:10 PatrickTulskie

Thanks @PatrickTulskie - I've rebased these changes and opened https://github.com/resque/resque-scheduler/pull/792, failing builds there appear unrelated to the changes (and the same as seen on master), but let me know if there's something I missed or you'd like to see addressed beforehand.

codealchemy avatar Oct 25 '24 05:10 codealchemy

@codealchemy Yeah I've seen those failures too. Something about the test matrix here needs to get fixed I guess. I'll look at that and your PR and see what I can do to get a release done.

PatrickTulskie avatar Oct 25 '24 11:10 PatrickTulskie

@PatrickTulskie thanks for looking into it, I've taken a swing at addressing the CI failures in a couple PRs (https://github.com/resque/resque-scheduler/pull/793, https://github.com/resque/resque-scheduler/pull/794) - here's a green CI with the three changes together.

codealchemy avatar Oct 25 '24 18:10 codealchemy

@PatrickTulskie please let me know if there's anything else I can do to help this along 🙇

codealchemy avatar Nov 04 '24 16:11 codealchemy

@PatrickTulskie please let me know if there's anything else I can do to help this along 🙇

Will do. I'm currently neck deep in 2 different things that are taking up all of my time. I just went through and teed up this and a bunch of other things that need my review though and I'm hoping to get through them all in the next week or two when I have a little down time.

PatrickTulskie avatar Nov 04 '24 16:11 PatrickTulskie

Closing. This will get handled here: https://github.com/resque/resque-scheduler/pull/792

PatrickTulskie avatar Dec 29 '24 20:12 PatrickTulskie