queue_config.cpp 558 B

12345678910111213141516171819202122
  1. #include "queue_config.h"
  2. using namespace NBus;
  3. TBusQueueConfig::TBusQueueConfig() {
  4. // workers and listeners configuratioin
  5. NumWorkers = 1;
  6. }
  7. void TBusQueueConfig::ConfigureLastGetopt(
  8. NLastGetopt::TOpts& opts, const TString& prefix) {
  9. opts.AddLongOption(prefix + "worker-count")
  10. .RequiredArgument("COUNT")
  11. .DefaultValue(ToString(NumWorkers))
  12. .StoreResult(&NumWorkers);
  13. }
  14. TString TBusQueueConfig::PrintToString() const {
  15. TStringStream ss;
  16. ss << "NumWorkers=" << NumWorkers << "\n";
  17. return ss.Str();
  18. }