UNPKG

@microfleet/ioredis-lock

Version:

Node distributed locking using redis with ioredis adapter

6 lines (5 loc) 370 B
/** * Exports the required lua scripts to be loaded into redis. */ export declare const delifequal = "\nif redis.call(\"GET\", KEYS[1]) == ARGV[1] then\n return redis.call(\"DEL\", KEYS[1])\nend\nreturn 0"; export declare const pexpireifequal = "\nif redis.call(\"GET\", KEYS[1]) == ARGV[1] then\n return redis.call(\"PEXPIRE\", KEYS[1], ARGV[2])\nend\nreturn 0\n";