mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-08-07 13:29:49 +00:00
Call wrapper methods instead of plain run().
This commit is contained in:
parent
f4c495c5ea
commit
d6682eb130
4 changed files with 19 additions and 22 deletions
|
@ -169,10 +169,9 @@ namespace dindb {
|
|||
assert(file_id_int >= data_size);
|
||||
const auto base_file_id = file_id_int - data_size + 1;
|
||||
|
||||
auto batch = m_redis.command().make_batch();
|
||||
auto batch = m_redis.make_batch();
|
||||
|
||||
batch.run(
|
||||
"HMSET",
|
||||
batch.hmset(
|
||||
set_key,
|
||||
"name", parSetData.name,
|
||||
"disk_label", parSetData.disk_label,
|
||||
|
@ -187,8 +186,7 @@ namespace dindb {
|
|||
const std::string file_key = PROGRAM_NAME ":file:" + lexical_cast<std::string>(z);
|
||||
const auto& file_data = parData[z - base_file_id];
|
||||
const std::string hash = tiger_to_string(file_data.hash);
|
||||
batch.run(
|
||||
"HMSET",
|
||||
batch.hmset(
|
||||
file_key,
|
||||
"hash", hash,
|
||||
"path", file_data.path(),
|
||||
|
@ -203,8 +201,7 @@ namespace dindb {
|
|||
"group_id", group_id
|
||||
);
|
||||
|
||||
batch.run(
|
||||
"SADD",
|
||||
batch.sadd(
|
||||
PROGRAM_NAME ":hash:" + hash,
|
||||
lexical_cast<std::string>(z)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue