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

Use sync redis client to determine prod mode worker number and add sanity check #2679

Merged
merged 1 commit into from Feb 21, 2024

Conversation

martinxu9
Copy link
Collaborator

Summary

  • Use sync redis client to determine prod mode worker number and add sanity check.
  • Redis async connection tries to acquire the lock when initializing. In python 3.8 and 3.9, a loop argument was not passed when acquiring lock and fails to find the event loop. From python 3.10, loop was removed and the asyncio APIs are simplified.

Tests

  • Using python 3.8 or 3.9 and run simple apps such as counter: REDIS_URL='redis://localhost:6379' reflex run --env prod, the app crashes. With this fix, the app no longer crashes.

@martinxu9 martinxu9 merged commit a3be76f into main Feb 21, 2024
45 checks passed
@martinxu9 martinxu9 deleted the mx/fix-get-redis branch February 21, 2024 15:01
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.

None yet

2 participants