From cb808e7720a720dd46c37372ba90f8f1aadd876c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 31 Oct 2024 17:20:07 -0700 Subject: add to pending after debit --- lib/db.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/db.ts') diff --git a/lib/db.ts b/lib/db.ts index 2bff5e97..13c06344 100644 --- a/lib/db.ts +++ b/lib/db.ts @@ -37,6 +37,7 @@ local pid = KEYS[6] local total = tonumber(ARGV[1]) local credit = tonumber(ARGV[2]) +local hash = ARGV[3] local payment = redis.call('get', paymentKey) @@ -46,6 +47,7 @@ if payment ~= nil then redis.call('del', paymentKey) redis.call('del', hashKey) redis.call('lrem', paymentsKey, 0, pid); + redis.call('srem', 'pending', hash); end return pid -- cgit v1.2.3