diff options
author | nga <nga@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
commit | 1f553f46fb4f3c5eec631352cdd900a0709016af (patch) | |
tree | a231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/messagebus/debug_receiver/debug_receiver.cpp | |
parent | c4de7efdedc25b49cbea74bd589eecb61b55b60a (diff) | |
download | ydb-1f553f46fb4f3c5eec631352cdd900a0709016af.tar.gz |
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/debug_receiver/debug_receiver.cpp')
-rw-r--r-- | library/cpp/messagebus/debug_receiver/debug_receiver.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/library/cpp/messagebus/debug_receiver/debug_receiver.cpp b/library/cpp/messagebus/debug_receiver/debug_receiver.cpp index 23b02d1003..dfd3d0f1c9 100644 --- a/library/cpp/messagebus/debug_receiver/debug_receiver.cpp +++ b/library/cpp/messagebus/debug_receiver/debug_receiver.cpp @@ -1,42 +1,42 @@ #include "debug_receiver_handler.h" #include "debug_receiver_proto.h" - + #include <library/cpp/messagebus/ybus.h> #include <library/cpp/getopt/last_getopt.h> #include <library/cpp/lwtrace/all.h> - -using namespace NBus; - -int main(int argc, char** argv) { - NLWTrace::StartLwtraceFromEnv(); - - TBusQueueConfig queueConfig; - TBusServerSessionConfig sessionConfig; - - NLastGetopt::TOpts opts; - - queueConfig.ConfigureLastGetopt(opts); - sessionConfig.ConfigureLastGetopt(opts); - - opts.AddLongOption("port").Required().RequiredArgument("PORT").StoreResult(&sessionConfig.ListenPort); - - opts.SetFreeArgsMax(0); - - NLastGetopt::TOptsParseResult r(&opts, argc, argv); - - TBusMessageQueuePtr q(CreateMessageQueue(queueConfig)); - - TDebugReceiverProtocol proto; - TDebugReceiverHandler handler; - - TBusServerSessionPtr serverSession = TBusServerSession::Create(&proto, &handler, sessionConfig, q); - // TODO: race is here - handler.ServerSession = serverSession.Get(); - - for (;;) { - Sleep(TDuration::Hours(17)); - } - - return 0; -} + +using namespace NBus; + +int main(int argc, char** argv) { + NLWTrace::StartLwtraceFromEnv(); + + TBusQueueConfig queueConfig; + TBusServerSessionConfig sessionConfig; + + NLastGetopt::TOpts opts; + + queueConfig.ConfigureLastGetopt(opts); + sessionConfig.ConfigureLastGetopt(opts); + + opts.AddLongOption("port").Required().RequiredArgument("PORT").StoreResult(&sessionConfig.ListenPort); + + opts.SetFreeArgsMax(0); + + NLastGetopt::TOptsParseResult r(&opts, argc, argv); + + TBusMessageQueuePtr q(CreateMessageQueue(queueConfig)); + + TDebugReceiverProtocol proto; + TDebugReceiverHandler handler; + + TBusServerSessionPtr serverSession = TBusServerSession::Create(&proto, &handler, sessionConfig, q); + // TODO: race is here + handler.ServerSession = serverSession.Get(); + + for (;;) { + Sleep(TDuration::Hours(17)); + } + + return 0; +} |