end
end
local ok = lua_redis.redis_make_request(task, redis_params, ident.key, true, on_set, 'SETEX',
- { ident.key, tostring(ttl), payload })
+ { ident.key, tostring(math.floor(ttl)), payload })
if not ok then
rspamd_logger.errx(task, 'llm_context: set request was not scheduled')
end
conn:add_cmd('HINCRBYFLOAT', { rkey, hash_key, tostring(tok[2]) })
if expire and expire ~= 0 then
- conn:add_cmd('EXPIRE', { rkey, tostring(expire) })
+ conn:add_cmd('EXPIRE', { rkey, tostring(math.floor(expire)) })
end
end
{
ann_key,
tostring(os.time()),
- tostring(math.max(10.0, rule.watch_interval * 2)),
+ tostring(math.floor(math.max(10.0, rule.watch_interval * 2))),
rspamd_util.get_hostname()
})
end
true, -- is write
redis_reserve_cb, --callback
'SET', -- command
- { key, 'processing', 'EX', tostring(settings.timeout * 2), 'NX' } -- arguments
+ { key, 'processing', 'EX', tostring(math.floor(settings.timeout * 2)), 'NX' } -- arguments
)
if not ret then
rspamd_logger.errx(task, 'Couldn\'t schedule SET')