cbdata->inflight += 2;
}
}
-
- /* Set up the required keys */
- ucl_object_insert_key (cbdata->cur,
- ucl_object_typed_new (UCL_INT), "revision", 0, false);
- ucl_object_insert_key (cbdata->cur,
- ucl_object_typed_new (UCL_INT), "used", 0, false);
- ucl_object_insert_key (cbdata->cur,
- ucl_object_typed_new (UCL_INT), "total", 0, false);
- ucl_object_insert_key (cbdata->cur,
- ucl_object_typed_new (UCL_INT), "size", 0, false);
- ucl_object_insert_key (cbdata->cur,
- ucl_object_fromstring (cbdata->elt->ctx->stcf->symbol),
- "symbol", 0, false);
- ucl_object_insert_key (cbdata->cur, ucl_object_fromstring ("redis"),
- "type", 0, false);
- ucl_object_insert_key (cbdata->cur, ucl_object_fromint (0),
- "languages", 0, false);
- ucl_object_insert_key (cbdata->cur, ucl_object_fromint (processed),
- "users", 0, false);
}
}
+ /* Set up the required keys */
+ ucl_object_insert_key (cbdata->cur,
+ ucl_object_typed_new (UCL_INT), "revision", 0, false);
+ ucl_object_insert_key (cbdata->cur,
+ ucl_object_typed_new (UCL_INT), "used", 0, false);
+ ucl_object_insert_key (cbdata->cur,
+ ucl_object_typed_new (UCL_INT), "total", 0, false);
+ ucl_object_insert_key (cbdata->cur,
+ ucl_object_typed_new (UCL_INT), "size", 0, false);
+ ucl_object_insert_key (cbdata->cur,
+ ucl_object_fromstring (cbdata->elt->ctx->stcf->symbol),
+ "symbol", 0, false);
+ ucl_object_insert_key (cbdata->cur, ucl_object_fromstring ("redis"),
+ "type", 0, false);
+ ucl_object_insert_key (cbdata->cur, ucl_object_fromint (0),
+ "languages", 0, false);
+ ucl_object_insert_key (cbdata->cur, ucl_object_fromint (processed),
+ "users", 0, false);
+
rspamd_upstream_ok (cbdata->selected);
}
else {
lua_redis_timeout (int fd, short what, gpointer u)
{
struct lua_redis_ctx *ctx = u;
- struct lua_redis_userdata *ud;
REF_RETAIN (ctx);
- ud = &ctx->d.async;
msg_info ("timeout while querying redis server");
lua_redis_push_error ("timeout while connecting the server", ctx, TRUE);
REF_RELEASE (ctx);
struct lua_redis_userdata *ud;
struct rspamd_task *task = NULL;
gboolean ret = FALSE;
- gdouble timeout = REDIS_DEFAULT_TIMEOUT;
if (lua_istable (L, 1)) {
/* Table version */
lua_pop (L, 1);
- lua_pushstring (L, "timeout");
- if (lua_type (L, -1) == LUA_TNUMBER) {
- lua_gettable (L, -2);
- }
- timeout = lua_tonumber (L, -1);
- lua_pop (L, 1);
-
if (task != NULL && addr != NULL) {
ctx = g_slice_alloc0 (sizeof (struct lua_redis_ctx));
REF_INIT_RETAIN (ctx, lua_redis_dtor);