Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerIndex.cpp @ 5450:9ffd6d18daf3 pg-transactions
log lines now contain the thread name
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 05 Dec 2023 16:26:35 +0100 |
parents | b83192e7ad10 |
children | 176bc05f85f4 68e9f7815fb8 |
comparison
equal
deleted
inserted
replaced
5449:29858f424fc7 | 5450:9ffd6d18daf3 |
---|---|
274 | 274 |
275 | 275 |
276 void ServerIndex::FlushThread(ServerIndex* that, | 276 void ServerIndex::FlushThread(ServerIndex* that, |
277 unsigned int threadSleepGranularityMilliseconds) | 277 unsigned int threadSleepGranularityMilliseconds) |
278 { | 278 { |
279 Logging::SetCurrentThreadName("DB-FLUSH"); | |
280 | |
279 // By default, wait for 10 seconds before flushing | 281 // By default, wait for 10 seconds before flushing |
280 static const unsigned int SLEEP_SECONDS = 10; | 282 static const unsigned int SLEEP_SECONDS = 10; |
281 | 283 |
282 if (threadSleepGranularityMilliseconds > 1000) | 284 if (threadSleepGranularityMilliseconds > 1000) |
283 { | 285 { |
427 } | 429 } |
428 | 430 |
429 void ServerIndex::UnstableResourcesMonitorThread(ServerIndex* that, | 431 void ServerIndex::UnstableResourcesMonitorThread(ServerIndex* that, |
430 unsigned int threadSleepGranularityMilliseconds) | 432 unsigned int threadSleepGranularityMilliseconds) |
431 { | 433 { |
434 Logging::SetCurrentThreadName("UNSTABLE-MON"); | |
435 | |
432 int stableAge; | 436 int stableAge; |
433 | 437 |
434 { | 438 { |
435 OrthancConfiguration::ReaderLock lock; | 439 OrthancConfiguration::ReaderLock lock; |
436 stableAge = lock.GetConfiguration().GetUnsignedIntegerParameter("StableAge", 60); | 440 stableAge = lock.GetConfiguration().GetUnsignedIntegerParameter("StableAge", 60); |