Skip to content

Conversation

tannakartikey
Copy link
Contributor

The enqueue_after_transaction_commit method was recently added to ActiveJob to be supported by the adapters.
PR: rails/rails#51426

Copy link
Contributor

@namolnad namolnad left a comment

Choose a reason for hiding this comment

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

Just noticed one quick typo :)

Co-authored-by: Dan Loman <[email protected]>
@rosa
Copy link
Member

rosa commented Apr 14, 2024

@tannakartikey thank you so much for this! It was in my to-do list so this is super helpful 😊

I was thinking, however, about setting this by default to true 🤔 I think it's safer for most people and goes more in the spirit of this change in Active Job.

If setting it to true by default, we'd need to modify this section in the README because the behaviour it warns about would be disabled now.

@tannakartikey
Copy link
Contributor Author

@tannakartikey thank you so much for this! It was in my to-do list so this is super helpful 😊

I was thinking, however, about setting this by default to true 🤔 I think it's safer for most people and goes more in the spirit of this change in Active Job.

If setting it to true by default, we'd need to modify this section in the README because the behavior it warns about would be disabled now.

Glad to hear that, @rosa. Thank you for reviewing.

I have set it to true by default and updated README. Let me know what you think. Thanks

@zerobearing2
Copy link

Any idea when this might get merged? This issue has blocked us from staying on edge rails atm.

@rosa
Copy link
Member

rosa commented Apr 25, 2024

Hey @zerobearing2, I'll merge now, sorry for the delay. I've been working on other stuff and travelling, and after the first review, I failed to get back to it to review the newer changes 😳

This issue has blocked us from staying on edge rails atm.

How so? Couldn't you just have set config.active_job.enqueue_after_transaction_commit to always or never? 🤔

Anyway, I'll merge this now. Thanks so much again, @tannakartikey, the README change looks great.

@rosa rosa merged commit 96cabdb into rails:main Apr 25, 2024
@zerobearing2
Copy link

How so? Couldn't you just have set config.active_job.enqueue_after_transaction_commit to always or never? 🤔

We kept getting missing method error for solid queue adapter due to missing enqueue_after_transaction_commit? method. Wasn't aware setting enqueue_after_transaction_commit to always or never would skip the check. 🤔 Thanks for merging though, cheers!

rosa added a commit that referenced this pull request Apr 29, 2024
After some great points raised on #212, and the suggestion given by the
same Rails guides. This was the original value set in #209, that was changed
as I suggested it ^_^U.
rosa added a commit that referenced this pull request Apr 29, 2024
After some great points raised on #212, and the suggestion given by the
same Rails guides. This was the original value set in #209, that was changed
as I suggested it ^_^U.
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.

4 participants