diff --git a/src/ye_olde_redis.cr b/src/ye_olde_redis.cr new file mode 100644 index 0000000..095ff12 --- /dev/null +++ b/src/ye_olde_redis.cr @@ -0,0 +1,11 @@ +# Monkeypatch to revert to the old Redis behavior, for Redis servers pre 6.2 which don't support +# https://redis.io/docs/latest/commands/lmove/ +module Mosquito + class RedisBackend < Mosquito::Backend + def dequeue : JobRun? + if id = redis.rpoplpush waiting_q, pending_q + JobRun.retrieve id.to_s + end + end + end +end