mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-24 03:35:52 +01:00
Output TQueue load time to log.
This commit is contained in:
parent
81f298361c
commit
8a3d43daa9
@ -260,6 +260,7 @@ void ClientManager::start_up() {
|
||||
|
||||
// init tqueue
|
||||
{
|
||||
auto load_start_time = td::Time::now();
|
||||
auto tqueue_binlog = td::make_unique<td::TQueueBinlog<td::Binlog>>();
|
||||
auto binlog = td::make_unique<td::Binlog>();
|
||||
auto tqueue = td::TQueue::create();
|
||||
@ -276,7 +277,6 @@ void ClientManager::start_up() {
|
||||
})
|
||||
.ensure();
|
||||
tqueue_binlog.reset();
|
||||
LOG(WARNING) << "Loaded " << loaded_event_count << " TQueue events";
|
||||
|
||||
if (!failed_to_replay_log_event_ids.empty()) {
|
||||
LOG(ERROR) << "Failed to replay " << failed_to_replay_log_event_ids.size() << " TQueue events";
|
||||
@ -291,6 +291,9 @@ void ClientManager::start_up() {
|
||||
tqueue->set_callback(std::move(concurrent_tqueue_binlog));
|
||||
|
||||
parameters_->shared_data_->tqueue_ = std::move(tqueue);
|
||||
|
||||
LOG(WARNING) << "Loaded " << loaded_event_count << " TQueue events in " << (td::Time::now() - load_start_time)
|
||||
<< " seconds";
|
||||
}
|
||||
|
||||
// init webhook_db
|
||||
|
Loading…
Reference in New Issue
Block a user