Mercurial > hg > orthanc-databases
comparison PostgreSQL/Plugins/IndexPlugin.cpp @ 234:d1b124d116c1
PostgreSQL index plugin handles retries for collisions between multiple writers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 08 Apr 2021 10:50:01 +0200 |
parents | c8e06b41feec |
children | 3bc442765b88 |
comparison
equal
deleted
inserted
replaced
233:7d46c99523a2 | 234:d1b124d116c1 |
---|---|
54 return 0; | 54 return 0; |
55 } | 55 } |
56 | 56 |
57 try | 57 try |
58 { | 58 { |
59 const size_t countConnections = 5; // TODO - PARAMETER | |
60 const unsigned int maxDatabaseRetries = 10; // TODO - PARAMETER | |
61 | |
59 OrthancDatabases::PostgreSQLParameters parameters(postgresql); | 62 OrthancDatabases::PostgreSQLParameters parameters(postgresql); |
60 OrthancDatabases::IndexBackend::Register(new OrthancDatabases::PostgreSQLIndex(context, parameters)); | 63 OrthancDatabases::IndexBackend::Register( |
64 new OrthancDatabases::PostgreSQLIndex(context, parameters), countConnections, maxDatabaseRetries); | |
61 } | 65 } |
62 catch (Orthanc::OrthancException& e) | 66 catch (Orthanc::OrthancException& e) |
63 { | 67 { |
64 LOG(ERROR) << e.What(); | 68 LOG(ERROR) << e.What(); |
65 return -1; | 69 return -1; |