Skip to content
Snippets Groups Projects
Commit 604d90a3 authored by Langella Olivier's avatar Langella Olivier
Browse files

trying to avoid unneeded file check (for performance)

parent 16d79b59
No related branches found
No related tags found
No related merge requests found
......@@ -65,14 +65,12 @@ WorkerStatus
MsIdListWorkerStatus::getStatus(
IdentificationDataSourceSp identificationDataSource)
{
if(std::find(m_identificationReady.begin(),
m_identificationReady.end(),
identificationDataSource.get()) != m_identificationReady.end())
{
return WorkerStatus::Ready;
}
if(std::find(m_identificationError.begin(),
m_identificationError.end(),
identificationDataSource.get()) != m_identificationError.end())
......@@ -88,6 +86,19 @@ MsIdListWorkerStatus::getStatus(
return WorkerStatus::FileNotFound;
}
if(identificationDataSource->getMsRunSp().get()->getMsRunReaderSPtr() !=
nullptr)
{
QVariant msrun_var =
identificationDataSource->getMsRunSp()->getMsRunStatistics(
MsRunStatistics::total_spectra);
if(!msrun_var.isNull())
{
m_identificationReady.push_back(identificationDataSource.get());
return WorkerStatus::Ready;
}
}
// Check if idDataSource is in the deque
if(std::find(m_waitingComputing.begin(),
m_waitingComputing.end(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment