From da7135e51b8ceaa45436b0a85b67391c1abc921e Mon Sep 17 00:00:00 2001 From: lzq Date: Mon, 28 Jul 2025 09:30:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/application.cpp | 2 +- src/common/event_manager.cpp | 2 +- src/common/logging.cpp | 2 +- src/common/thread_pool.h | 3 +-- src/device_holder.cpp | 8 ++++---- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/application.cpp b/src/application.cpp index a2fc98f..ed8b500 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -121,7 +121,7 @@ namespace zsy oss = std::make_shared(config); - mqttSvr = std::make_shared(); + // mqttSvr = std::make_shared(); mqttCliHolder = std::make_shared(config, eventManager); diff --git a/src/common/event_manager.cpp b/src/common/event_manager.cpp index a9eac1b..d0f32a0 100644 --- a/src/common/event_manager.cpp +++ b/src/common/event_manager.cpp @@ -16,7 +16,7 @@ namespace zsy } } - EventManager::EventManager(): threadPool(std::make_shared("事件线程池", 4)) + EventManager::EventManager(): threadPool(std::make_shared("事件线程池", 10)) { } diff --git a/src/common/logging.cpp b/src/common/logging.cpp index cd38011..98339d2 100644 --- a/src/common/logging.cpp +++ b/src/common/logging.cpp @@ -13,7 +13,7 @@ namespace zsy // const auto file_sink = std::make_shared(SysUtil::WORK_DIR + "\\logs\\deviceAccessLayer.log", 0, 0); auto file_sink = std::make_shared( SysUtil::WORK_DIR + "\\logs\\deviceAccessLayer.log", - 100 * 1024 * 1024, + 50 * 1024 * 1024, 15 ); file_sink->set_level(spdlog::level::info); diff --git a/src/common/thread_pool.h b/src/common/thread_pool.h index 3492f13..4c4e2f9 100644 --- a/src/common/thread_pool.h +++ b/src/common/thread_pool.h @@ -26,9 +26,8 @@ namespace zsy void createThread(); - public: - explicit ThreadPool(std::string name,uint16_t threadCount = std::thread::hardware_concurrency() * 2); + explicit ThreadPool(std::string name, uint16_t threadCount = std::thread::hardware_concurrency() * 2); void submit(const std::function &task); diff --git a/src/device_holder.cpp b/src/device_holder.cpp index 05a77fd..8a1ee09 100644 --- a/src/device_holder.cpp +++ b/src/device_holder.cpp @@ -3,8 +3,8 @@ #include "barrier/generic_barrier.h" #include "platform_scale/generic_platform_scale.h" #include "sound_column/generic_sound_column.h" -#include "vidicon/generic_vidicon.h" -// #include "vidicon/barrier_vidicon.h" +// #include "vidicon/generic_vidicon.h" +#include "vidicon/barrier_vidicon.h" namespace zsy { void DeviceHolder::initBarriers(std::vector &configs) @@ -39,8 +39,8 @@ namespace zsy { { for (auto &config: configs) { - vidicons.emplace(config.sn, std::make_shared(config)); - // vidicons.emplace(config.sn, std::make_shared(config)); + // vidicons.emplace(config.sn, std::make_shared(config)); + vidicons.emplace(config.sn, std::make_shared(config)); } }