]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Expire neural ham and spam sets so they not hangup in redis indefinitely
authorDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Tue, 4 Mar 2025 19:26:56 +0000 (20:26 +0100)
committerGitHub <noreply@github.com>
Tue, 4 Mar 2025 19:26:56 +0000 (20:26 +0100)
lualib/redis_scripts/neural_save_unlock.lua

index 5af1ddcde0dc782611d035898e922b64fe2d9338..bb5f69531b345bcb655fe2b5aac2fb1c1edaa15f 100644 (file)
@@ -17,8 +17,10 @@ redis.call('DEL', KEYS[1] .. '_ham_set')
 redis.call('HDEL', KEYS[1], 'lock')
 redis.call('HDEL', KEYS[7], 'lock')
 redis.call('EXPIRE', KEYS[1], tonumber(KEYS[5]))
+redis.call('EXPIRE', KEYS[1] .. '_spam_set', tonumber(KEYS[5]))
+redis.call('EXPIRE', KEYS[1] .. '_ham_set', tonumber(KEYS[5]))
 redis.call('HSET', KEYS[1], 'roc_thresholds', KEYS[8])
 if KEYS[9] then
   redis.call('HSET', KEYS[1], 'pca', KEYS[9])
 end
-return 1
\ No newline at end of file
+return 1