Fix side-effect causing distant jobs to abort.
ClosedPublic

Authored by TallFurryMan on May 18 2018, 6:22 AM.

Details

Summary

This change corrects the case where an ASAP job is scheduled to start at a later date/time because its score is not yet positive.
With this change, only executeJob does switch the job state to JOB_BUSY, so that no other part of the code can unexpectedly start the job.

Note that periodic score update is prepared in this commit to display negative scores properly, but score computation needs rework beforehand.

But this does not solve the problem of duplicated repeated jobs where only the pipeline tracking activity is enabled, which has similar symptom.

A new test vector, 'distant_jobs_no_twilight', has two north-hemisphere targets with opposite transit times.
This allows testing a job immediately, and having the scheduler sleeping to wait for the next.

Test Plan

Use 'distant_jobs_no_twilight' to test sleeping mode.
Without the change, the first job completes, but the second job runs immediately, aborts, and does weird things.
With the change, the first job completes, and the second job properly waits for its schedule.

If using the telescope simulator, you may observe a problem with parking, which unexpectedly stops the scheduler, but lets the system in an incorrect state.

Use all other test vectors to hunt for regressions.
I have a weird issue with the capture tab on my setup and the RGBLRGB sequence: the CCD simulator has all captures stored as blue filter, will investigate.

Diff Detail

Repository
R321 KStars
Branch
bugfix__distant_jobs (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
TallFurryMan created this revision.May 18 2018, 6:22 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptMay 18 2018, 6:22 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
TallFurryMan requested review of this revision.May 18 2018, 6:22 AM
TallFurryMan updated this revision to Diff 34411.

Added missing test vector.

mutlaqja accepted this revision.May 18 2018, 6:31 AM
This revision is now accepted and ready to land.May 18 2018, 6:31 AM
This revision was automatically updated to reflect the committed changes.