瀏覽代碼

[Minor] Add log line about hyperscan cleanup

tags/3.5
Vsevolod Stakhov 1 年之前
父節點
當前提交
2828c6049c
No account linked to committer's email address
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      src/libserver/hyperscan_tools.cxx

+ 5
- 1
src/libserver/hyperscan_tools.cxx 查看文件

@@ -184,8 +184,9 @@ public:
}

auto cleanup_maybe() -> void {
auto env_cleanup_disable = std::getenv("RSPAMD_NO_CLEANUP");
/* We clean dir merely if we are running from the main process */
if (rspamd_current_worker == nullptr && std::getenv("RSPAMD_NO_CLEANUP") == nullptr) {
if (rspamd_current_worker == nullptr && env_cleanup_disable == nullptr) {
const auto *log_func = RSPAMD_LOG_FUNC;
auto cleanup_dir = [&](std::string_view dir) -> void {
for (const auto &ext : cache_extensions) {
@@ -234,6 +235,9 @@ public:
cache_extensions.clear();
known_cached_files.clear();
}
else if (rspamd_current_worker == nullptr && env_cleanup_disable != nullptr) {
msg_debug_hyperscan("disable hyperscan cleanup: env variable RSPAMD_NO_CLEANUP is set");
}
}
};


Loading…
取消
儲存