Skip to content

fix(apalis-redis): enable "allow-undeclared-keys" for dragonflydb in stats.lua #567

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

Merged
merged 3 commits into from
May 12, 2025

Conversation

lukapeschke
Copy link
Contributor

#506 introduced a bug when using apalis-redis with dragonfly DB: Since keys get programatically generated, in the for loop counting running jobs, the script does not work with dragonfly, which forbids using undeclared keys by default: https://www.dragonflydb.io/docs/managing-dragonfly/scripting#allowing-undeclared-keys .

With Redis, accessing undeclared keys is allowed, but considered a bad practice: https://redis.io/docs/latest/commands/eval/#:~:text=Important%3A%20to,in%20the%20database

A long-term fix would probably be something like storing a counter of running jobs somewhere, and pass the key of the counter to the script

@lukapeschke
Copy link
Contributor Author

@geofmureithi does this fix look good to you ? Or do you want me to change anything else ?

@geofmureithi geofmureithi merged commit 465c574 into geofmureithi:main May 12, 2025
6 checks passed
@lukapeschke lukapeschke deleted the fix-redis-stats branch May 12, 2025 12:05
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