Commit 4930a874 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

When checking job completion, check rememberJobProgress flag

parent 5089e1b6
......@@ -3886,6 +3886,7 @@ bool Scheduler::estimateJobTime(SchedulerJob *schedJob)
int totalSequenceCount=0, totalCompletedCount=0;
double totalImagingTime=0;
bool rememberJobProgress = Options::rememberJobProgress();
foreach (SequenceJob *job, jobs)
{
if (job->getUploadMode() == ISD::CCD::UPLOAD_LOCAL)
......@@ -3895,14 +3896,16 @@ bool Scheduler::estimateJobTime(SchedulerJob *schedJob)
return false;
}
int completed = getCompletedFiles(job->getFITSDir(), job->getFullPrefix());
int completed = 0;
if (rememberJobProgress)
completed = getCompletedFiles(job->getFITSDir(), job->getFullPrefix());
// If we have a LIGHT frame that still has remaining images then return false
if (job->getFrameType() == FRAME_LIGHT && completed < job->getCount())
lightFramesRequired = true;
totalSequenceCount += job->getCount();
totalCompletedCount += completed;
totalCompletedCount += rememberJobProgress ? completed : 0;
totalImagingTime += fabs((job->getExposure() + job->getDelay()) * (job->getCount() - completed));
if (completed < job->getCount() && job->getFrameType() == FRAME_LIGHT)
......
Markdown is supported
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