Fix regression with completed jobs being rescheduled erroneously.

Authored by TallFurryMan on May 16 2018, 3:42 PM.

Description

Fix regression with completed jobs being rescheduled erroneously.

Summary:
A recent change made a completed job return to evaluation, in order to verify that duplicates were either complete too or needed repeats.
This caused those completed jobs to be considered again for processing after being re-evaluated.
This was an issue in the case option 'Remember Job Progress' was enabled, because Ekos would not run any capture and would stall the Scheduler.
Filtering again on state after evaluating and before considering the next job solves the issue.

Test Plan:
Test with .esl "simple_test_no_twilight" with option 'Remember Job Progress' enabled.
Without this change, selected job completes, but stays selected for next observation. Scheduler stalls.
With this change, selected job completes, but is subsequently disregarded by the scheduler, as expected.

Reviewers: mutlaqja

Subscribers: kde-edu

Tags: KDE Edu

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

Details