]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Slightly improve log messages
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 4 Oct 2019 15:19:54 +0000 (16:19 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 4 Oct 2019 15:19:54 +0000 (16:19 +0100)
src/hs_helper.c

index a20e176f6ed0a23860757bb15f879a38bef99a1a..d0fbb1cd9471d9fc0c3446354fd5f71da1a2eb60 100644 (file)
@@ -213,8 +213,7 @@ rspamd_rs_compile_cb (guint ncompiled, GError *err, void *cbd)
        ctx = (struct hs_helper_ctx *)worker->ctx;
 
        if (ncompiled > 0) {
-               msg_info ("compiled %d regular expressions to the hyperscan tree",
-                               ncompiled);
+               /* Enforce update for other workers */
                hack_global_forced = TRUE;
        }
 
@@ -225,6 +224,15 @@ rspamd_rs_compile_cb (guint ncompiled, GError *err, void *cbd)
        if (!ctx->loaded) {
                when = 5.0; /* Postpone */
                ctx->loaded = TRUE;
+               msg_info ("compiled %d regular expressions to the hyperscan tree, "
+                                 "postpone loaded notification for %.0f seconds to avoid races",
+                               ncompiled,
+                               when);
+       }
+       else {
+               msg_info ("compiled %d regular expressions to the hyperscan tree, "
+                                 "send loaded notification",
+                               ncompiled);
        }
 
        tm = g_malloc0 (sizeof (*tm));