diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-07 13:17:35 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-07 13:17:35 +0000 |
commit | 2828c6049c40b9c2de349967d22e8f73e03a6065 (patch) | |
tree | 8d8c590ef66bf270a20e4c9e9d51dbc3ae87e204 /src/libserver | |
parent | 3680254ecbe6f0414ca6afda5d139a61e2aea405 (diff) | |
download | rspamd-2828c6049c40b9c2de349967d22e8f73e03a6065.tar.gz rspamd-2828c6049c40b9c2de349967d22e8f73e03a6065.zip |
[Minor] Add log line about hyperscan cleanup
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/hyperscan_tools.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libserver/hyperscan_tools.cxx b/src/libserver/hyperscan_tools.cxx index 49b695cd2..d30f11a14 100644 --- a/src/libserver/hyperscan_tools.cxx +++ b/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"); + } } }; |