if not redis_err then
upstream:ok()
else
- rspamd_logger.infox(task, 'got error %s when setting asn record on server %s',
+ rspamd_logger.errx(task, 'got error %s when setting asn record on server %s',
redis_err, upstream:get_addr())
upstream:fail()
end
redis_key, tostring(options['expire'])
})
else
- rspamd_logger.infox(task, 'got error while connecting to redis: %1', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'got error while connecting to redis')
end
end
end
{key, tostring(options.expire)} -- arguments
)
if not ret then
- upstream:fail()
+ rspamd_logger.err('got error connecting to redis')
end
end
end
{key, 'version', 'data', 'spam', 'ham'} -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'redis error on host %s', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'got error connecting to redis')
end
end
{key, 'version'} -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'redis error on host %s', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'got error connecting to redis')
end
end
conn:add_cmd('HINCRBY', {key, 'ham', 1})
end
else
- rspamd_logger.errx(task, 'redis error on host %s: %s', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'got error connecting to redis')
end
end
{body_key, meta_key} -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'cannot make redis request to check results')
- upstream:fail()
+ rspamd_logger.err(task, 'cannot make redis request to check results')
end
end
meta_key, tostring(settings['expire'])
})
else
- rspamd_logger.infox(task, 'got error while connecting to redis: %1', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'got error while connecting to redis')
end
elseif do_greylisting or do_greylisting_required then
local t = tostring(math.floor(rspamd_util.get_time()))
meta_key, tostring(settings['expire']), t
})
else
- rspamd_logger.infox(task, 'got error while connecting to redis: %s',
- upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'got error while connecting to redis')
end
else
if action ~= 'no action' and action ~= 'reject' then
redis_args -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'Redis HMSET failed on %s', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'error connecting to redis')
return
end
args -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'Call to redis at %s failed', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'error connecting to redis')
end
end
end
{channel, data} -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'Redis PUBLISH failed')
- upstream:fail()
+ rspamd_logger.err(task, 'error connecting to redis')
end
end
if url then
{key, tostring(settings.expire_novalid), '0'} -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'Redis SETEX failed')
- upstream:fail()
+ rspamd_logger.err(task, 'got error connecting to redis')
end
else
local valid_mx = {}
{key, tostring(settings.expire), table.concat(valid_mx, ';')} -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'Redis SETEX failed')
- upstream:fail()
+ rspamd_logger.err(task, 'error connecting to redis')
end
end
end
fun.totable(fun.map(function(l) return l[2] end, args)) -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'Redis MGET failed on %s', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'got error connecting to redis')
end
end
conn:add_cmd('setex', v)
end, fun.drop_n(1, values))
else
- rspamd_logger.infox(task, 'got error while connecting to redis: %1', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'got error while connecting to redis')
end
end
end
fun.totable(fun.map(function(l) return l[2] end, args)) -- arguments
)
if not ret then
- rspamd_logger.errx(task, 'Redis MGET failed on %s', upstream:get_addr())
- upstream:fail()
+ rspamd_logger.err(task, 'got error connecting to redis')
end
end