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

Save Lua scripts as class vars; register them once #283

Merged
merged 2 commits into from
Dec 4, 2020

Conversation

brainix
Copy link
Owner

@brainix brainix commented Dec 4, 2020

Previously, we were saving Lua scripts as instance variables and
re-registering them every time we instantiated a Redlock or NextId.

I got this pattern from here:
https://github.com/andymccurdy/redis-py/blob/1a41cfd95a53a95b078084d8627be6b6fba3bb71/redis/lock.py#L140-L149

Previously, we were saving Lua scripts as instance variables and
re-registering them every time we instantiated a `Redlock` or `NextId`.

I got this pattern from here:
https://github.com/andymccurdy/redis-py/blob/1a41cfd95a53a95b078084d8627be6b6fba3bb71/redis/lock.py#L140-L149
@brainix
Copy link
Owner Author

brainix commented Dec 4, 2020

🐟

@brainix brainix merged commit fb29409 into master Dec 4, 2020
@brainix brainix deleted the lua-script-registration branch December 4, 2020 07:06
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.

1 participant