]> source.dussan.org Git - rspamd.git/commitdiff
add missing change in configured state when no update is needed on index_policy
authorDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Mon, 14 Oct 2024 12:35:24 +0000 (14:35 +0200)
committerDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Mon, 14 Oct 2024 12:35:24 +0000 (14:35 +0200)
src/plugins/lua/elastic.lua

index b2c6d36ba107fc64f84e93e6c21152d55736d3f4..b117d6e4c7a57181e0cc1c84f009fe6f1b4e2935 100644 (file)
@@ -823,7 +823,10 @@ local function get_index_policy(cfg, ev_base, upstream, host, policy_url, index_
               update_needed = true
             end
           end
-          if update_needed then
+          if not update_needed then
+            rspamd_logger.infox(rspamd_config, 'elastic index policy is up-to-date')
+            states['index_policy']['configured'] = true
+          else
             if detected_distro['name'] == 'elastic' then
               put_index_policy(cfg, ev_base, upstream, host, policy_url, index_policy_json)
             elseif detected_distro['name'] == 'opensearch' then