rspamd_strtoul (reply->str, reply->len, &num);
}
- obj = (ucl_object_t *)ucl_object_lookup (cbdata->cur, "revision");
+ obj = (ucl_object_t *) ucl_object_lookup (cbdata->cur, "revision");
if (obj) {
obj->value.iv += num;
}
else {
learned_key = "learns_ham";
}
+ redisAsyncCommand (cbdata->redis,
+ rspamd_redis_stat_learns,
+ cbdata,
+ "HGET %s %s",
+ k, learned_key);
+ cbdata->inflight += 1;
+ }
+ else {
+ redisAsyncCommand (cbdata->redis,
+ rspamd_redis_stat_key,
+ cbdata,
+ "HLEN %s",
+ k);
+ redisAsyncCommand (cbdata->redis,
+ rspamd_redis_stat_learns,
+ cbdata,
+ "HGET %s %s",
+ k, learned_key);
+ cbdata->inflight += 2;
}
-
- redisAsyncCommand (cbdata->redis, rspamd_redis_stat_key,
- cbdata,
- "HLEN %s",
- k);
- redisAsyncCommand (cbdata->redis, rspamd_redis_stat_learns,
- cbdata,
- "HGET %s %s",
- k, learned_key);
- cbdata->inflight += 2;
}
}
}