Mercurial > hg > orthanc
changeset 4572:c12d4e5f469b db-changes
removed redundant ServerIndex::SignalNewResource()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 08 Mar 2021 17:08:10 +0100 |
parents | 9224e107d613 |
children | f6bd5563b5df |
files | OrthancServer/Sources/ServerIndex.cpp OrthancServer/Sources/ServerIndex.h |
diffstat | 2 files changed, 4 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerIndex.cpp Mon Mar 08 16:49:34 2021 +0100 +++ b/OrthancServer/Sources/ServerIndex.cpp Mon Mar 08 17:08:10 2021 +0100 @@ -683,19 +683,6 @@ } - void ServerIndex::SignalNewResource(ChangeType changeType, - ResourceType level, - const std::string& publicId, - int64_t internalId) - { - ServerIndexChange change(changeType, level, publicId); - db_.LogChange(internalId, change); - - assert(listener_.get() != NULL); - listener_->SignalChange(change); - } - - StoreStatus ServerIndex::Store(std::map<MetadataType, std::string>& instanceMetadata, const DicomMap& dicomSummary, const Attachments& attachments, @@ -764,21 +751,21 @@ // impact when new patient/study/series get created, which // occurs far less often that creating new instances. The // positive impact looks marginal in practice. - SignalNewResource(ChangeType_NewInstance, ResourceType_Instance, hashInstance, instanceId); + LogChange(instanceId, ChangeType_NewInstance, ResourceType_Instance, hashInstance); if (status.isNewSeries_) { - SignalNewResource(ChangeType_NewSeries, ResourceType_Series, hashSeries, status.seriesId_); + LogChange(status.seriesId_, ChangeType_NewSeries, ResourceType_Series, hashSeries); } if (status.isNewStudy_) { - SignalNewResource(ChangeType_NewStudy, ResourceType_Study, hashStudy, status.studyId_); + LogChange(status.studyId_, ChangeType_NewStudy, ResourceType_Study, hashStudy); } if (status.isNewPatient_) { - SignalNewResource(ChangeType_NewPatient, ResourceType_Patient, hashPatient, status.patientId_); + LogChange(status.patientId_, ChangeType_NewPatient, ResourceType_Patient, hashPatient); }
--- a/OrthancServer/Sources/ServerIndex.h Mon Mar 08 16:49:34 2021 +0100 +++ b/OrthancServer/Sources/ServerIndex.h Mon Mar 08 17:08:10 2021 +0100 @@ -101,11 +101,6 @@ ResourceType resourceType, const std::string& publicId); - void SignalNewResource(ChangeType changeType, - ResourceType level, - const std::string& publicId, - int64_t internalId); - void NormalizeLookup(std::vector<DatabaseConstraint>& target, const DatabaseLookup& source, ResourceType level) const;