collectiveidea / delayed_job

Database based asynchronous priority queue system -- Extracted from Shopify
http://groups.google.com/group/delayed_job
MIT License
4.81k stars 955 forks source link

Support ruby 3 and kwargs #1158

Open jdelStrother opened 2 years ago

jdelStrother commented 2 years ago

Based on the work @webhoernchen started in #1130.

We've been running this in production for a month while upgrading an installation from ruby 2.7 to 3.0 without issue. I think I've managed to keep support for ruby 2.6, but haven't done much more than run the test suite on it.

unixmonkey commented 2 years ago

@jdelStrother Could you fix the conflicts in this PR to make it mergable? This is working great for me on a Ruby 3.1 project, and I'd love to see it get released.

jdelStrother commented 2 years ago

If the maintainers are interested in merging this I’ll fix up the conflicts, but I’m no longer using DJ. Feel free to take over this branch if you’re more invested

c960657 commented 5 months ago

You should also pass add **kwargs to the method generated dynamically by handle_asynchronously:

https://github.com/collectiveidea/delayed_job/blob/b66bb64437a8606a414a390531ac73108911434e/lib/delayed/message_sending.rb#L39-L50