Skip to content

Conversation

@smudge
Copy link
Member

@smudge smudge commented Apr 3, 2025

I'm adding regression coverage for the changes made in #53, and making one additional change in line with the way that the :perform callback works in the delayed_job gem - there is also now a test that will more explicitly check the order of callback events and behavior on job failure.

Plus, while debugging in an app, I noticed that datadog tries to cast priority to a float, which was raising a method undefined error. So I added Delayed::Priority#to_f and added a test to cover all the explicit conversion methods (to_s, to_i, to_f, to_d).

/no-platform

@smudge smudge requested a review from argvniyx-enroute April 3, 2025 15:52
Delayed::Job.enqueue ErrorJob.new
described_class.new.work_off

expect(events).to eq %i(thread_start perform_start perform_end thread_end)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link

@argvniyx-enroute argvniyx-enroute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domainlgtm

@smudge smudge merged commit 427bc30 into Betterment:main Apr 3, 2025
27 checks passed
@smudge smudge deleted the priority-to-f branch April 3, 2025 17:24
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

Successfully merging this pull request may close these issues.

2 participants