closeio / tasktiger

Python task queue using Redis
MIT License
1.42k stars 80 forks source link

Rewrite `_move` helper in Lua (to add Redis 7 support) #284

Closed nsaje closed 1 year ago

nsaje commented 1 year ago

closes https://github.com/closeio/tasktiger/issues/268

In order to not need the execute_pipeline script that doesn't work on Redis >= 6.2.7 (and also on earlier versions with security patches backported, like on AWS ElastiCache), I rewrote the _move() helper in Lua directly.

Added the ability to include existing scripts as local functions when loading a script from file in order to facilitate code reuse.

Any suggestions how to improve the Lua code? For example Redis doesn't know how to pass bools and nulls to Lua so I had to convert them to strings, any better options?