]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Run finish scripts for fuzzy workers
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 25 Jan 2025 13:45:34 +0000 (13:45 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 25 Jan 2025 13:46:06 +0000 (13:46 +0000)
src/libserver/worker_util.c
src/rspamd.h

index 75836573ff56a447e626463c6750fb4ca23c80f1..39e70e4ca34e2cc7ad0b6c8d8811307a851a810b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -190,7 +190,7 @@ rspamd_worker_terminate_handlers(struct rspamd_worker *w)
                        if (w->state != rspamd_worker_wait_final_scripts) {
                                w->state = rspamd_worker_wait_final_scripts;
 
-                               if ((w->flags & RSPAMD_WORKER_SCANNER) &&
+                               if ((w->flags & (RSPAMD_WORKER_SCANNER|RSPAMD_WORKER_FUZZY)) &&
                                        rspamd_worker_call_finish_handlers(w)) {
                                        msg_info("performing async finishing actions");
                                        w->state = rspamd_worker_wait_final_scripts;
index a5ef068e172eb4d36c0c4b5e391f26043781359b..be66a192b761535d433c7794f245d0f326041c17 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -69,6 +69,7 @@ enum rspamd_worker_flags {
        RSPAMD_WORKER_NO_TERMINATE_DELAY = (1 << 7),
        RSPAMD_WORKER_OLD_CONFIG = (1 << 8),
        RSPAMD_WORKER_NO_STRICT_CONFIG = (1 << 9),
+       RSPAMD_WORKER_FUZZY = (1 << 10),
 };
 
 struct rspamd_worker_accept_event {