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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of RedisBackend's health_check_interval #6666

Merged
merged 3 commits into from
Mar 16, 2021
Merged

Allow configuration of RedisBackend's health_check_interval #6666

merged 3 commits into from
Mar 16, 2021

Conversation

mrbcmorris
Copy link
Contributor

@mrbcmorris mrbcmorris commented Mar 8, 2021

Description

馃憢 Hey folks,

Was working through a reliability issue on our end with our Redis connections and came across the need to update the health_check_interval for the underlying Redis connection. The goal here is a simple implementation that allows reading this value via environment variable (redis_backend_health_check_interval) and passing this through as a kwarg to the underlying redis-py module.

This is my proposed solution to #6665. Please let me know what you think and thank you for the great library.

Cheers,
Chris

@codecov
Copy link

codecov bot commented Mar 8, 2021

Codecov Report

Merging #6666 (e367ddf) into master (07000d8) will decrease coverage by 5.13%.
The diff coverage is 11.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6666      +/-   ##
==========================================
- Coverage   75.60%   70.46%   -5.14%     
==========================================
  Files         138      138              
  Lines       16377    16497     +120     
  Branches     2052     2074      +22     
==========================================
- Hits        12382    11625     -757     
- Misses       3777     4669     +892     
+ Partials      218      203      -15     
Flag Coverage 螖
unittests 70.46% <11.62%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
celery/bin/amqp.py 0.00% <0.00%> (酶)
celery/bin/base.py 0.00% <0.00%> (酶)
celery/bin/beat.py 0.00% <0.00%> (酶)
celery/bin/call.py 0.00% <0.00%> (酶)
celery/bin/celery.py 0.00% <0.00%> (酶)
celery/bin/control.py 0.00% <0.00%> (酶)
celery/bin/events.py 0.00% <0.00%> (酶)
celery/bin/list.py 0.00% <0.00%> (酶)
celery/bin/migrate.py 0.00% <0.00%> (酶)
celery/bin/multi.py 0.00% <0.00%> (酶)
... and 48 more

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 8492b75...e367ddf. Read the comment docs.

celery/backends/redis.py Show resolved Hide resolved
@auvipy auvipy added this to the 5.1.0 milestone Mar 9, 2021
@auvipy auvipy added this to In progress in Celery 5.1.0 via automation Mar 9, 2021
@lgtm-com
Copy link

lgtm-com bot commented Mar 9, 2021

This pull request introduces 1 alert when merging 6c7148b into f091bab - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

Copy link
Member

@thedrow thedrow left a comment

Choose a reason for hiding this comment

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

LGTM

@thedrow thedrow requested review from auvipy and a team March 16, 2021 12:18
@thedrow thedrow self-assigned this Mar 16, 2021
@thedrow thedrow moved this from In progress to Review in progress in Celery 5.1.0 Mar 16, 2021
Celery 5.1.0 automation moved this from Review in progress to Reviewer approved Mar 16, 2021
@auvipy auvipy merged commit 36e4452 into celery:master Mar 16, 2021
Celery 5.1.0 automation moved this from Reviewer approved to Done Mar 16, 2021
@auvipy
Copy link
Member

auvipy commented Mar 16, 2021

thanks, both of you!

@thedrow thedrow linked an issue Mar 17, 2021 that may be closed by this pull request
4 tasks
jeyrce pushed a commit to jeyrce/celery that referenced this pull request Aug 25, 2021
)

* Allow configuration of RedisBackend health_check_interval

* Only add key if value is set

* Added documentation for the redis_backend_health_check_interval setting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Celery 5.1.0
  
Done
Development

Successfully merging this pull request may close these issues.

Allow setting health_check_interval for Redis backends
3 participants