comparison Framework/Oracle/ThreadedOracle.cpp @ 1140:6333e6f7248e broker

fix cache
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Nov 2019 16:53:15 +0100
parents 87fbeb823375
children 7aad0984d38a
comparison
equal deleted inserted replaced
1139:8d2f1b25593c 1140:6333e6f7248e
394 LOG(ERROR) << "ThreadedOracle::Start(): (state_ != State_Setup)"; 394 LOG(ERROR) << "ThreadedOracle::Start(): (state_ != State_Setup)";
395 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 395 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
396 } 396 }
397 else 397 else
398 { 398 {
399 LOG(WARNING) << "Starting oracle with " << workers_.size() << " worker threads";
399 state_ = State_Running; 400 state_ = State_Running;
400 401
401 for (unsigned int i = 0; i < workers_.size(); i++) 402 for (unsigned int i = 0; i < workers_.size(); i++)
402 { 403 {
403 workers_[i] = new boost::thread(Worker, this); 404 workers_[i] = new boost::thread(Worker, this);
422 queue_.Enqueue(item.release()); 423 queue_.Enqueue(item.release());
423 return true; 424 return true;
424 } 425 }
425 else 426 else
426 { 427 {
427 LOG(INFO) << "Command not enqueued, as the oracle is stopped"; 428 LOG(TRACE) << "Command not enqueued, as the oracle has stopped";
428 return false; 429 return false;
429 } 430 }
430 } 431 }
431 } 432 }
432 } 433 }