return options
end
-local function load_script_task(script, task)
+local function load_script_task(script, task, is_write)
local rspamd_redis = require "rspamd_redis"
local opts = prepare_redis_call(script)
for _,opt in ipairs(opts) do
opt.task = task
+ opt.is_write = is_write
opt.callback = function(err, data)
if err then
logger.errx(task, 'cannot upload script to %s: %s; registered from: %s:%s',
end
end
-local function load_script_taskless(script, cfg, ev_base)
+local function load_script_taskless(script, cfg, ev_base, is_write)
local rspamd_redis = require "rspamd_redis"
local opts = prepare_redis_call(script)
for _,opt in ipairs(opts) do
opt.config = cfg
opt.ev_base = ev_base
+ opt.is_write = is_write
opt.callback = function(err, data)
if err then
logger.errx(cfg, 'cannot upload script to %s: %s; registered from: %s:%s',
callback('NOSCRIPT', nil)
end
end)
- load_script_task(script, params.task)
+ load_script_task(script, params.task, params.is_write)
end
end