diff options
author | Pouriya <pouriya.jahanbakhsh@gmail.com> | 2022-01-21 03:14:28 +0330 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 03:14:28 +0330 |
commit | 03485f5e940326a9fdbcf2ecd1918b2772003a6a (patch) | |
tree | 5ce253cdd24e11f0f2bd90babbbf0bc38e38c575 /src/mod_pubsub_opt.erl | |
parent | Merge branch 'processone:master' into master (diff) | |
parent | mod_pubsub: Allow for limiting item_expire value (diff) |
Merge branch 'processone:master' into master
Diffstat (limited to 'src/mod_pubsub_opt.erl')
-rw-r--r-- | src/mod_pubsub_opt.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mod_pubsub_opt.erl b/src/mod_pubsub_opt.erl index 8db5532f6..cb3c014b9 100644 --- a/src/mod_pubsub_opt.erl +++ b/src/mod_pubsub_opt.erl @@ -11,6 +11,7 @@ -export([hosts/1]). -export([ignore_pep_from_offline/1]). -export([last_item_cache/1]). +-export([max_item_expire_node/1]). -export([max_items_node/1]). -export([max_nodes_discoitems/1]). -export([max_subscriptions_node/1]). @@ -68,7 +69,13 @@ last_item_cache(Opts) when is_map(Opts) -> last_item_cache(Host) -> gen_mod:get_module_opt(Host, mod_pubsub, last_item_cache). --spec max_items_node(gen_mod:opts() | global | binary()) -> non_neg_integer(). +-spec max_item_expire_node(gen_mod:opts() | global | binary()) -> 'infinity' | pos_integer(). +max_item_expire_node(Opts) when is_map(Opts) -> + gen_mod:get_opt(max_item_expire_node, Opts); +max_item_expire_node(Host) -> + gen_mod:get_module_opt(Host, mod_pubsub, max_item_expire_node). + +-spec max_items_node(gen_mod:opts() | global | binary()) -> 'unlimited' | non_neg_integer(). max_items_node(Opts) when is_map(Opts) -> gen_mod:get_opt(max_items_node, Opts); max_items_node(Host) -> |