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

Fix redis health checks #1122

Merged
merged 3 commits into from
Dec 1, 2019

Conversation

Ashish-Bansal
Copy link
Contributor

@Ashish-Bansal Ashish-Bansal commented Nov 11, 2019

Description

Fixes #1019

#1113 didn't set health_check_interval parameter due to which calling health_check on the underlying redis client become no-op.

Testing

I have tested this branch on my setup and seems to work fine, I'm able to receive "PING" "redis-py-health-check" messages in redis monitor.

Though I haven't tested SentinelChannel. As far as I can see, it won't work on Sentinel but at least won't be crashing it out. I don't plan to add support for Sentinel since I won't be able to test it out.

Other than that, I have handled it for both newer as well as older redis python clients.

@Ashish-Bansal Ashish-Bansal force-pushed the fix_redis_health_checks branch from 91889cb to c3a45b7 Compare November 11, 2019 14:15
@auvipy
Copy link
Member

auvipy commented Nov 11, 2019

python 3 tests are faiing

@Ashish-Bansal Ashish-Bansal force-pushed the fix_redis_health_checks branch from c3a45b7 to 5fec5b7 Compare November 11, 2019 15:35
@codecov
Copy link

codecov bot commented Nov 11, 2019

Codecov Report

Merging #1122 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1122      +/-   ##
==========================================
+ Coverage   88.79%   88.82%   +0.02%     
==========================================
  Files          65       65              
  Lines        6767     6780      +13     
  Branches      813      815       +2     
==========================================
+ Hits         6009     6022      +13     
  Misses        665      665              
  Partials       93       93
Impacted Files Coverage Δ
kombu/utils/functional.py 98.62% <100%> (+0.05%) ⬆️
kombu/transport/redis.py 91.17% <100%> (+0.06%) ⬆️

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 8276480...f55b74e. Read the comment docs.

@Ashish-Bansal Ashish-Bansal changed the title [WIP] Fix redis health checks Fix redis health checks Nov 11, 2019
@Ashish-Bansal Ashish-Bansal force-pushed the fix_redis_health_checks branch from 5fec5b7 to b530d5b Compare November 11, 2019 15:53
@Ashish-Bansal
Copy link
Contributor Author

@auvipy Please review this PR, thanks!

@Ashish-Bansal Ashish-Bansal force-pushed the fix_redis_health_checks branch from 85ec678 to 7d59889 Compare November 11, 2019 16:08
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

if you have time, can you also add some integration tests?

@deepchatterjeeligo
Copy link

I tried installing celery from master (https://github.com/celery/celery.git) and kombu from #1122 (https://github.com/LeetCode-OpenSource/kombu.git) and can confirm that a minimal check like that mentioned here does not throw an exception.

@Ashish-Bansal
Copy link
Contributor Author

if you have time, can you also add some integration tests?

Hm, I'll try to look into integration tests this weekend.

@auvipy
Copy link
Member

auvipy commented Nov 27, 2019

any update on integration tests?

@Ashish-Bansal
Copy link
Contributor Author

Ashish-Bansal commented Dec 2, 2019

any update on integration tests?

I did check up integration tests some time ago but there was more amount of work needed on that. So, I couldn't finish them up. I would like someone else to take that task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Error 110 while writing to socket. Connection timed out." With kombu 4.4.0/4.5.0 and redis 3.2.0/3.2.1
3 participants