collectiveidea / delayed_job_active_record

ActiveRecord backend integration for DelayedJob 3.0+
MIT License
346 stars 336 forks source link

Rails 7 Support #196

Closed lachances closed 1 year ago

lachances commented 3 years ago

Any word on Rails 7 support? Tried migrating an existing Rails 6.1 app to Rails 7.0.0.alpha and getting the following error when running bundle delayed_job_active_record was resolved to 4.1.6, which depends on activerecord (>= 3.0, < 6.2)

apavlyut commented 3 years ago

i've resolved it by downgrading from ruby 3.0.2 to 3.0.1.

edariedl commented 3 years ago

There are already two pull request for it, but they are not merged yet:

kyrylo commented 2 years ago

Can we please move this forward?

tomrossi7 commented 2 years ago

Anything we can do to help this get merged?

smudge commented 2 years ago

:wave: Hey all! I just wanted to share that my team at Betterment is maintaining a Rails 7 and Ruby 3 compatible fork that combines delayed_job and delayed_job_active_record into a single gem (just delayed):

https://github.com/Betterment/delayed

First and foremost: I'd love to help upstream any changes or features that folks think would be valuable, but delayed_job's maintenance status is somewhat unclear right now and PRs don't seem to be getting merged. (🙁 )

Also worth noting: while the delayed gem aims to be compatible with existing DJ enqueue APIs & plugins, we've made a bunch of adjustments under the hood, so there are a few things to consider if you're thinking about switching, most notably the fact that it only supports ActiveRecord-backed jobs.

So why fork? I wrote about our motivations here, but basically, we had already been maintaining private forks for many years, focused on scaling up our own SQL-backed job queues (we're now up to tens of millions of jobs per day). This led to an overhauled concurrency model, changes to the pickup strategy, more built-in instrumentation/monitoring features, and a few other convenience changes (which we cover in the README). Ultimately, we diverged enough that when we decided to share our changes publicly earlier this year, packaging it all under a fork made sense.

So if you're here, and you're still reading this, maybe delayed will be of interest to you! If it is, and if you run into any issues in trying it out, please let us know! (Again, it isn't quite a 1:1 replacement, but it might be a relatively easy swap, depending on your existing usage.)

tomrossi7 commented 2 years ago

Thanks @smudge! I'm going to give this a shot!

nileshtrivedi commented 2 years ago

There are already two pull request for it, but they are not merged yet:

@edariedl Both of these PRs mention < 7.0 so I think they will not actually resolve this issue which is about supporting Rails 7.0. I think we need a fresh PR for 7.0.

In fact, delayed_job itself is referencing < 6.2 as of this moment, so the fix would have to start there.

edariedl commented 2 years ago

Yeah both of those pull requests are obsolete now (one of them was for delayed_job). New PRs or updates from maintainers are necessary.

nileshtrivedi commented 2 years ago

delayed_job has now merged Rails 7.0 support.