Pubsub node maxitem forced to 0 if non persistent node (thanks to Karim Gemayel)(EJAB-1434)
This commit is contained in:
parent
8faafc5b0d
commit
adcf2d5c4e
|
@ -2021,9 +2021,12 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->
|
||||||
Features = features(Type),
|
Features = features(Type),
|
||||||
PublishFeature = lists:member("publish", Features),
|
PublishFeature = lists:member("publish", Features),
|
||||||
PublishModel = get_option(Options, publish_model),
|
PublishModel = get_option(Options, publish_model),
|
||||||
MaxItems = max_items(Host, Options),
|
|
||||||
DeliverPayloads = get_option(Options, deliver_payloads),
|
DeliverPayloads = get_option(Options, deliver_payloads),
|
||||||
PersistItems = get_option(Options, persist_items),
|
PersistItems = get_option(Options, persist_items),
|
||||||
|
MaxItems = case PersistItems of
|
||||||
|
0 -> 0;
|
||||||
|
1 -> max_items(Host, Options)
|
||||||
|
end,
|
||||||
PayloadCount = payload_xmlelements(Payload),
|
PayloadCount = payload_xmlelements(Payload),
|
||||||
PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2
|
PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2
|
||||||
PayloadMaxSize = get_option(Options, max_payload_size),
|
PayloadMaxSize = get_option(Options, max_payload_size),
|
||||||
|
|
Loading…
Reference in New Issue