Mercurial > hg > orthanc-databases
comparison Odbc/Plugins/IndexPlugin.cpp @ 586:3b1070dcab2f find-refactoring tip
fix
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 04 Nov 2024 22:52:58 +0100 |
parents | 54d518dcd74a |
children |
comparison
equal
deleted
inserted
replaced
585:65e39e76c2b6 | 586:3b1070dcab2f |
---|---|
111 { | 111 { |
112 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange, | 112 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange, |
113 "No connection string provided for the ODBC index"); | 113 "No connection string provided for the ODBC index"); |
114 } | 114 } |
115 | 115 |
116 std::unique_ptr<OrthancDatabases::OdbcIndex> index(new OrthancDatabases::OdbcIndex(context, connectionString)); | 116 bool readOnly = configuration.GetBooleanValue("ReadOnly", false); |
117 | |
118 if (readOnly) | |
119 { | |
120 LOG(WARNING) << "READ-ONLY SYSTEM: the Database plugin is working in read-only mode"; | |
121 } | |
122 | |
123 std::unique_ptr<OrthancDatabases::OdbcIndex> index(new OrthancDatabases::OdbcIndex(context, connectionString, readOnly)); | |
117 index->SetMaxConnectionRetries(maxConnectionRetries); | 124 index->SetMaxConnectionRetries(maxConnectionRetries); |
118 index->SetConnectionRetryInterval(connectionRetryInterval); | 125 index->SetConnectionRetryInterval(connectionRetryInterval); |
119 | 126 |
120 OrthancDatabases::IndexBackend::Register(index.release(), countConnections, maxConnectionRetries); | 127 OrthancDatabases::IndexBackend::Register(index.release(), countConnections, maxConnectionRetries); |
121 } | 128 } |