Skip to content

Commit

Permalink
[?] Small code refactor - use fmtlib.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Mar 4, 2024
1 parent 31c92ec commit 3db30f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions indexing_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ namespace irods::indexing

std::string indexer::generate_delay_execution_parameters()
{
std::string params{config_.delay_parameters + "<INST_NAME>" + config_.instance_name + "</INST_NAME>"};
auto params = fmt::format("{}<INST_NAME>{}</INST_NAME>", config_.delay_parameters, config_.instance_name);

int min_time = config_.minimum_delay_time <= 0 ? 1 : config_.minimum_delay_time;
int max_time = config_.maximum_delay_time <= 0 ? 30 : config_.maximum_delay_time;
Expand All @@ -528,12 +528,11 @@ namespace irods::indexing
catch (const boost::bad_lexical_cast&) {
}

params += "<PLUSET>" + sleep_time + "s</PLUSET>";
params += fmt::format("<PLUSET>{}s</PLUSET>", sleep_time);

rodsLog(config_.log_level, "indexing: delay params min=[%d], max=[%d], computed=[%s]", min_time, max_time, params.c_str());

return params;

} // generate_delay_execution_parameters

void indexer::get_metadata_for_data_object(const std::string& _meta_attr_name,
Expand Down

0 comments on commit 3db30f2

Please sign in to comment.