Mercurial > hg > orthanc-databases
comparison MySQL/Plugins/IndexPlugin.cpp @ 253:3bc442765b88
new configuration option: "IndexConnectionsCount"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Apr 2021 15:08:51 +0200 |
parents | d1b124d116c1 |
children | 16aac0287485 |
comparison
equal
deleted
inserted
replaced
252:33fa478c119a | 253:3bc442765b88 |
---|---|
60 return 0; | 60 return 0; |
61 } | 61 } |
62 | 62 |
63 try | 63 try |
64 { | 64 { |
65 const size_t countConnections = 5; // TODO - PARAMETER | 65 const size_t countConnections = mysql.GetUnsignedIntegerValue("IndexConnectionsCount", 1); |
66 const unsigned int maxDatabaseRetries = 10; // TODO - PARAMETER | 66 |
67 | |
68 OrthancDatabases::MySQLParameters parameters(mysql, configuration); | 67 OrthancDatabases::MySQLParameters parameters(mysql, configuration); |
69 OrthancDatabases::IndexBackend::Register( | 68 OrthancDatabases::IndexBackend::Register( |
70 new OrthancDatabases::MySQLIndex(context, parameters), countConnections, maxDatabaseRetries); | 69 new OrthancDatabases::MySQLIndex(context, parameters), countConnections, |
70 parameters.GetMaxConnectionRetries()); | |
71 } | 71 } |
72 catch (Orthanc::OrthancException& e) | 72 catch (Orthanc::OrthancException& e) |
73 { | 73 { |
74 LOG(ERROR) << e.What(); | 74 LOG(ERROR) << e.What(); |
75 return -1; | 75 return -1; |