Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert fix: Prevent redis task loss when closing connection while in poll #2154

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thuibr
Copy link

@thuibr thuibr commented Oct 14, 2024

No description provided.

Copy link
Member

@Nusnus Nusnus left a comment

Choose a reason for hiding this comment

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

Hey, thank you for the fix.
Can you please explain what and why is the change please?
Also, please add unit tests.

Lastly, we can mark this as draft for now and ready again after the above is answered & the CI fully passes.

Thanks!

@Nusnus Nusnus marked this pull request as draft October 14, 2024 20:39
Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.48%. Comparing base (1691d3e) to head (b6eea5f).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2154      +/-   ##
==========================================
+ Coverage   81.47%   81.48%   +0.01%     
==========================================
  Files          77       77              
  Lines        9500     9507       +7     
  Branches     1148     1148              
==========================================
+ Hits         7740     7747       +7     
  Misses       1569     1569              
  Partials      191      191              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thuibr
Copy link
Author

thuibr commented Oct 15, 2024

Hi @Nusnus I was trying to debug #1785 but this doesn't do it. I will follow your guidance once I find a fix.

@thuibr thuibr changed the title don't brpop if closed revert fix: Prevent redis task loss when closing connection while in poll Nov 10, 2024
@thuibr
Copy link
Author

thuibr commented Nov 10, 2024

@Nusnus this now reverts #1733 because that causes bugs for #1785.

@thuibr
Copy link
Author

thuibr commented Nov 10, 2024

I also don't really understand the rationale in #1733. Why would completing a BRPOP re-enqueue a message in redis?

@thuibr
Copy link
Author

thuibr commented Nov 10, 2024

Alternatively, I could see setting socket_timeout to something by default instead of None, which also fixes the issue.

app.conf.broker_transport_options = {'socket_timeout': 5}

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