summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-09-18 09:13:11 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-09-18 09:13:11 (GMT)
commit1deb1f256accac062e41d2c58966020038a943ce (patch)
treeefcd7836e130c01e7da134aefeef66a0da94fafd
parent55f164cf1b8690c19508de77c969aa235cd5f172 (diff)
Add more logging to isSequenceFileComplete to diagnose any future issues
-rw-r--r--kstars/ekos/capture.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/kstars/ekos/capture.cpp b/kstars/ekos/capture.cpp
index 387c1e7..c4a18a8 100644
--- a/kstars/ekos/capture.cpp
+++ b/kstars/ekos/capture.cpp
@@ -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();