aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_task.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-10-29 21:29:50 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-10-29 21:29:50 +0100
commit1263db3fe0db50dae0a1a08281aed396fbe99dee (patch)
tree57c7cc594979db877d826bea2b816454028758d4 /src/lua/lua_task.c
parenta18c2f7c4b3628b33b7fde7508f4bd1763a9cde4 (diff)
downloadrspamd-1263db3fe0db50dae0a1a08281aed396fbe99dee.tar.gz
rspamd-1263db3fe0db50dae0a1a08281aed396fbe99dee.zip
[Minor] Slightly improve the documentation
Diffstat (limited to 'src/lua/lua_task.c')
-rw-r--r--src/lua/lua_task.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 263ec484e..3288b8385 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -716,9 +716,11 @@ LUA_FUNCTION_DEF (task, get_dkim_results);
/***
* @method task:get_symbol(name, [shadow_result_name])
* Searches for a symbol `name` in all metrics results and returns a list of tables
- * one per metric that describes the symbol inserted. Please note that this function
- * is intended to return values for **inserted** symbols, so if this symbol was not
- * inserted it won't be in the function's output. This method is useful for post-filters mainly.
+ * one per metric that describes the symbol inserted.
+ * Please note, that for using this function you need to ensure that the symbol
+ * being queried is already checked. This is guaranteed if there is a dependency
+ * between the caller symbol and the checked symbol (either virtual or real).
+ * Please check `rspamd_config:register_dependency` method for details.
* The symbols are returned as the list of the following tables:
*
* - `metric` - name of metric
@@ -777,7 +779,11 @@ LUA_FUNCTION_DEF (task, process_ann_tokens);
/***
* @method task:has_symbol(name, [shadow_result_name])
- * Fast path to check if a specified symbol is in the task's results
+ * Fast path to check if a specified symbol is in the task's results.
+ * Please note, that for using this function you need to ensure that the symbol
+ * being queried is already checked. This is guaranteed if there is a dependency
+ * between the caller symbol and the checked symbol (either virtual or real).
+ * Please check `rspamd_config:register_dependency` method for details.
* @param {string} name symbol's name
* @return {boolean} `true` if symbol has been found
*/