From a0fcefe7df99a6419fe37676ae5bcbfefd86cff9 Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Mon, 9 Dec 2024 10:01:57 +0100 Subject: [PATCH] fix(python): readded saveStacktrace script --- src/commands/saveStacktrace-1.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/commands/saveStacktrace-1.lua diff --git a/src/commands/saveStacktrace-1.lua b/src/commands/saveStacktrace-1.lua new file mode 100644 index 0000000000..52c91b6091 --- /dev/null +++ b/src/commands/saveStacktrace-1.lua @@ -0,0 +1,19 @@ +--[[ + Save stacktrace and failedReason. + Input: + KEYS[1] job key + ARGV[1] stacktrace + ARGV[2] failedReason + Output: + 0 - OK + -1 - Missing key +]] +local rcall = redis.call + +if rcall("EXISTS", KEYS[1]) == 1 then + rcall("HMSET", KEYS[1], "stacktrace", ARGV[1], "failedReason", ARGV[2]) + + return 0 +else + return -1 +end