Commit 1deb1f25 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Add more logging to isSequenceFileComplete to diagnose any future issues

parent 55f164cf
......@@ -3704,6 +3704,15 @@ bool Capture::isSequenceFileComplete(const QString &fileURL)
if (Options::rememberJobProgress() == false)
return false;
// We cannot know if the job is complete if the upload mode is local since we cannot inspect the files
if (currentCCD && currentCCD->getUploadMode() == ISD::CCD::UPLOAD_LOCAL)
return false;
if (Options::captureLogging())
{
qDebug() << "Capture: Loading sequence to check for completion: " << fileURL;
}
bool rc = loadSequenceQueue(fileURL);
if (rc == false)
......@@ -3711,10 +3720,6 @@ bool Capture::isSequenceFileComplete(const QString &fileURL)
ignoreJobProgress = false;
// We cannot know if the job is complete if the upload mode is local since we cannot inspect the files
if (currentCCD && currentCCD->getUploadMode() == ISD::CCD::UPLOAD_LOCAL)
return false;
QStringList jobDirs;
int totalJobCount = 0, totalFileCount=0;
foreach(SequenceJob *job, jobs)
......@@ -3725,11 +3730,22 @@ bool Capture::isSequenceFileComplete(const QString &fileURL)
jobDirs.removeDuplicates();
if (Options::captureLogging())
{
qDebug() << "Capture: Total Job Count --> " << totalFileCount;
qDebug() << "Capture: isSequenceFileComplete directories --> " << jobDirs;
}
foreach(QString dir, jobDirs)
{
QDir oneDir(dir);
oneDir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
totalFileCount += oneDir.count();
if (Options::captureLogging())
{
qDebug() << "Capture: Directory " << dir << " file count is " << oneDir.count() << " and total count is " << totalFileCount;
}
}
clearSequenceQueue();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment