diff options
author | Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> | 2025-03-04 20:26:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-04 20:26:56 +0100 |
commit | 9ef4e663cc1ef026e3ef80746ef744a08e881561 (patch) | |
tree | f333e09679ce92594e2780e8d70dfad48b1a59d7 | |
parent | 7e39489cd365094d30b037644f38a2b646ca5cd4 (diff) | |
download | rspamd-9ef4e663cc1ef026e3ef80746ef744a08e881561.tar.gz rspamd-9ef4e663cc1ef026e3ef80746ef744a08e881561.zip |
[Fix] Expire neural ham and spam sets so they not hangup in redis indefinitely
-rw-r--r-- | lualib/redis_scripts/neural_save_unlock.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lualib/redis_scripts/neural_save_unlock.lua b/lualib/redis_scripts/neural_save_unlock.lua index 5af1ddcde..bb5f69531 100644 --- a/lualib/redis_scripts/neural_save_unlock.lua +++ b/lualib/redis_scripts/neural_save_unlock.lua @@ -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 |