# HG changeset patch # User Alain Mazy # Date 1776092753 -7200 # Node ID c637e22051fa24c0763f8ab302ba672da67a0b7c # Parent 83411d1e402269f5dd016abf2b84023723734602 fix restarting a serialized StoreJob that was being executed diff -r 83411d1e4022 -r c637e22051fa OrthancServer/Sources/ServerJobs/StoreJob.cpp --- a/OrthancServer/Sources/ServerJobs/StoreJob.cpp Mon Apr 13 16:05:10 2026 +0200 +++ b/OrthancServer/Sources/ServerJobs/StoreJob.cpp Mon Apr 13 17:05:53 2026 +0200 @@ -92,7 +92,8 @@ instancesLoader_.reset(new ThreadedInstancesLoader(context_, loaderThreads, false, DicomTransferSyntax_LittleEndianImplicit /* dummy value not used*/, 0, GetLoaderPrefix())); - for (size_t i = 0; i < instancesIds_.size(); ++i) + size_t position = GetPosition(); // in case we reload a job in progress, we shall not preload the first instances + for (size_t i = position; i < instancesIds_.size(); ++i) { instancesLoader_->PreloadDicomInstance(instancesIds_[i], filesInfo_[i]); } diff -r 83411d1e4022 -r c637e22051fa OrthancServer/Sources/ServerJobs/ThreadedInstancesLoader.cpp --- a/OrthancServer/Sources/ServerJobs/ThreadedInstancesLoader.cpp Mon Apr 13 16:05:10 2026 +0200 +++ b/OrthancServer/Sources/ServerJobs/ThreadedInstancesLoader.cpp Mon Apr 13 17:05:53 2026 +0200 @@ -167,6 +167,7 @@ } const std::string& instanceId = instanceToPreload->GetId(); + LOG(INFO) << "Loader thread is loading instance " << instanceId; try {