removeDeduplicationKey-1.js 565 B

123456789101112131415161718192021222324
  1. const content = `--[[
  2. Remove deduplication key if it matches the job id.
  3. Input:
  4. KEYS[1] deduplication key
  5. ARGV[1] job id
  6. Output:
  7. 0 - false
  8. 1 - true
  9. ]]
  10. local rcall = redis.call
  11. local deduplicationKey = KEYS[1]
  12. local jobId = ARGV[1]
  13. local currentJobId = rcall('GET', deduplicationKey)
  14. if currentJobId and currentJobId == jobId then
  15. return rcall("DEL", deduplicationKey)
  16. end
  17. return 0
  18. `;
  19. export const removeDeduplicationKey = {
  20. name: 'removeDeduplicationKey',
  21. content,
  22. keys: 1,
  23. };
  24. //# sourceMappingURL=removeDeduplicationKey-1.js.map