Fix side-effect causing distant jobs to abort.

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

Description

Fix side-effect causing distant jobs to abort.

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.

Reviewers: mutlaqja

Reviewed By: mutlaqja

Subscribers: kde-edu

Tags: KDE Edu

Differential Revision: https://phabricator.kde.org/D12954

Details

Committed
mutlaqjaMay 18 2018, 6:32 AM
Reviewer
mutlaqja
Differential Revision
D12954: Fix side-effect causing distant jobs to abort.
Parents
R321:69f2f99b8251: Fix regression with completed jobs being rescheduled erroneously.
Branches
Unknown
Tags
Unknown

I should be able to fix the issue with repeated jobs I mentioned. It is a regression of the removals I did at 3982/4011, but I need to test.
After this last change I'll call for testing on the forum.
Any idea about the capture tab not storing captures in the right folder? My system config or a regression?