summaryrefslogtreecommitdiffstats
path: root/server/parser
diff options
context:
space:
mode:
Diffstat (limited to 'server/parser')
-rw-r--r--server/parser/rteval_parserd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/parser/rteval_parserd.c b/server/parser/rteval_parserd.c
index fa73458..d191faf 100644
--- a/server/parser/rteval_parserd.c
+++ b/server/parser/rteval_parserd.c
@@ -190,7 +190,7 @@ int main(int argc, char **argv) {
threadData_t **thrdata = NULL;
struct mq_attr msgq_attr;
mqd_t msgq;
- int i,rc, max_threads = 5;
+ int i,rc, max_threads = 0;
// Initialise XML and XSLT libraries
xsltInit();
@@ -240,6 +240,12 @@ int main(int argc, char **argv) {
goto exit;
}
+ // Get the number of worker threads
+ max_threads = atoi_nullsafe(eGet_value(config, "threads"));
+ if( max_threads == 0 ) {
+ max_threads = 4;
+ }
+
// Get a database connection for the main thread
dbc = db_connect(config, max_threads, logctx);
if( !dbc ) {