Skip to content

0.8.0 - Priority#to_f, plus some regression coverage#54

Merged
smudge merged 4 commits into
Betterment:mainfrom
smudge:priority-to-f
Apr 3, 2025
Merged

0.8.0 - Priority#to_f, plus some regression coverage#54
smudge merged 4 commits into
Betterment:mainfrom
smudge:priority-to-f

Conversation

@smudge

@smudge smudge commented Apr 3, 2025

Copy link
Copy Markdown
Member

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
Comment thread spec/worker_spec.rb
Delayed::Job.enqueue ErrorJob.new
described_class.new.work_off

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎉

@argvniyx-enroute argvniyx-enroute left a comment

Copy link
Copy Markdown

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
@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