chore: Remove redundant fn 'get_thread_name'
This commit is contained in:
1 parent
14651341c4
commit
7d19ea84ab
1 file changed
+7
-13
@@ -18,12 +18,6 @@ namespace bts::cmds::md::cmds {
|
||||
|
||||
static std::optional<std::thread> _md_thread;
|
||||
|
||||
std::string get_thread_name() {
|
||||
std::string rv;
|
||||
os::get_thread_name(&rv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static void boot_sleep() {
|
||||
auto conf = config::get<bts::md::MDBootDelayWindow>();
|
||||
const auto *start = &conf.standard_start();
|
||||
@@ -38,18 +32,18 @@ static void boot_sleep() {
|
||||
if (datetime::is_local_time_between(hh_start, mm_start, hh_end, mm_end)) {
|
||||
auto sleep_period = std::chrono::seconds(conf.delay_seconds());
|
||||
LOG(md, Info, "Run::boot_sleep t_id{} t_name:{} sleep_period:{}",
|
||||
os::get_thread_id(), get_thread_name(), sleep_period.count());
|
||||
os::get_thread_id(), os::get_thread_name(), sleep_period.count());
|
||||
std::this_thread::sleep_for(sleep_period);
|
||||
} else {
|
||||
LOG(md, Info, "Run::boot_sleep t_id{} t_name:{} sleep_period:{}",
|
||||
os::get_thread_id(), get_thread_name(), 2);
|
||||
os::get_thread_id(), os::get_thread_name(), 2);
|
||||
std::this_thread::sleep_for(2s);
|
||||
}
|
||||
}
|
||||
|
||||
static void run_replay() {
|
||||
LOG(md, Info, "Run::run_replay t_id:{} t_name", os::get_thread_id(),
|
||||
get_thread_name());
|
||||
os::get_thread_name());
|
||||
const auto &replay_opts = config::get<bts::md::ReplayOptions>();
|
||||
bts::md::replay_recording(
|
||||
replay_opts.url(), config::get<bts::md::RelayOptions>().naggle_ms(),
|
||||
@@ -60,7 +54,7 @@ static void run_onixs(
|
||||
bts::md::MBOWriter *mbo_writer,
|
||||
bts::md::TradeSummarySignalDispatcher *tss_dispatcher) {
|
||||
LOG(md, Info, "Run::run_onixs t_id:{} t_name", os::get_thread_id(),
|
||||
get_thread_name());
|
||||
os::get_thread_name());
|
||||
std::vector<std::shared_ptr<bts::md::IMDPlatform>> platforms;
|
||||
// get all glbx symbols
|
||||
std::vector<bts::md::UserSymbol> cme_symbols;
|
||||
@@ -102,7 +96,7 @@ static void run_emumba() {
|
||||
|
||||
static void run_md_gwy() {
|
||||
LOG(md, Info, "Run::run_md_gwy t_id:{} t_name:{}", os::get_thread_id(),
|
||||
get_thread_name());
|
||||
os::get_thread_name());
|
||||
// bts::md::CCMain cc_main = {};
|
||||
// cc_main.run();
|
||||
bts::md::MarketDataGateway gwy = {};
|
||||
@@ -118,7 +112,7 @@ void Run::run(
|
||||
bool run_on_md_thread) {
|
||||
md::cmds::Cleanup::execute();
|
||||
LOG(md, Info, "Run::run cleanup:{} run_on_md_thread:{} t_id:{} t_name:{}",
|
||||
cleanup, run_on_md_thread, os::get_thread_id(), get_thread_name());
|
||||
cleanup, run_on_md_thread, os::get_thread_id(), os::get_thread_name());
|
||||
if (type == Run::MDType::Configured &&
|
||||
!config::get<bts::md::HistoricMarketDataConfig>().use_md()) {
|
||||
LOG(md, Info, "Ignoring request to run md: 'use_md' is configured false");
|
||||
@@ -127,7 +121,7 @@ void Run::run(
|
||||
|
||||
auto impl = [&mbo_writer, &tss_dispatcher, &type, &cleanup]() {
|
||||
LOG(md, Info, "Run::impl lambda t_id: {} t_name: {}", os::get_thread_id(),
|
||||
get_thread_name());
|
||||
os::get_thread_name());
|
||||
if (cleanup)
|
||||
md::cmds::Cleanup::execute();
|
||||
if (type == Run::MDType::Configured) {
|
||||
|
||||
Reference in new issue
Block a user