From 413e08bb4f8dd7e85e5bc86b15751d1789553fe3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 24 Jun 2016 16:47:22 +0100 Subject: [Feature] Allow to skip some initialization phases to speed up rspamadm --- src/libserver/cfg_file.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/libserver/cfg_file.h') diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 93470c0f3..eaaafc318 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -453,12 +453,21 @@ const ucl_object_t * rspamd_config_get_module_opt (struct rspamd_config *cfg, */ gchar rspamd_config_parse_flag (const gchar *str, guint len); +enum rspamd_post_load_options { + RSPAMD_CONFIG_INIT_URL = 1 << 0, + RSPAMD_CONFIG_INIT_LIBS = 1 << 1, + RSPAMD_CONFIG_INIT_SYMCACHE = 1 << 2, + RSPAMD_CONFIG_INIT_VALIDATE = 1 << 3 +}; + +#define RSPAMD_CONFIG_LOAD_ALL (RSPAMD_CONFIG_INIT_URL|RSPAMD_CONFIG_INIT_LIBS|RSPAMD_CONFIG_INIT_SYMCACHE|RSPAMD_CONFIG_INIT_VALIDATE) + /** * Do post load actions for config * @param cfg config file */ gboolean rspamd_config_post_load (struct rspamd_config *cfg, - gboolean validate_cache); + enum rspamd_post_load_options opts); /** * Calculate checksum for config file -- cgit v1.2.3