The number of jabber server stanza workers is now configurable.
git-svn-id: http://voip.null.ro/svn/yate@2905 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
93c9fb5d62
commit
2b326634dc
|
@ -66,6 +66,16 @@
|
|||
; Defaults to enable
|
||||
;entitycaps=enable
|
||||
|
||||
; workers: integer: The number of worker threads processing stanzas received by streams
|
||||
; Minimum allowed value is 1, maximum allowed value is 10
|
||||
; Defaults to 1
|
||||
;workers=1
|
||||
|
||||
; worker_priority: string: Worker threads priority
|
||||
; Allowed values: lowest, low, normal, high, highest
|
||||
; Defaults to normal
|
||||
;worker_priority=normal
|
||||
|
||||
; printxml: boolean/string: Print sent/received XML data to output if debug
|
||||
; level is at least 9
|
||||
; Allowed values are boolean values or 'verbose' string
|
||||
|
@ -99,7 +109,7 @@
|
|||
; These are the default values for some known types (only if this parameter is missing)
|
||||
; c2s 5222
|
||||
; s2s 5269
|
||||
; Tehre is no default value for external component listeners
|
||||
; There is no default value for external component listeners
|
||||
;port=
|
||||
|
||||
; backlog: integer: Maximum length of the queue of pending connections
|
||||
|
|
|
@ -2911,8 +2911,12 @@ void JBModule::initialize()
|
|||
m_handlers.append(h);
|
||||
}
|
||||
// Start pending job workers
|
||||
// TODO: add config for worker count and thread priority
|
||||
JBPendingWorker::initialize(3);
|
||||
int n = cfg.getIntValue("general","workers",1);
|
||||
if (n < 1)
|
||||
n = 1;
|
||||
else if (n > 10)
|
||||
n = 10;
|
||||
JBPendingWorker::initialize(n,Thread::priority(cfg.getValue("general","worker_priority")));
|
||||
|
||||
// Load entity caps file
|
||||
s_entityCaps.m_enable = cfg.getBoolValue("general","entitycaps",true);
|
||||
|
|
Loading…
Reference in New Issue