D12485: Scheduler adjustments and fixes

Eric Dejouhanet noreply at phabricator.kde.org
Tue Apr 24 06:38:15 UTC 2018


TallFurryMan created this revision.
TallFurryMan added a reviewer: mutlaqja.
Restricted Application added a subscriber: KDE Edu.
Restricted Application added a project: KDE Edu.
TallFurryMan requested review of this revision.

REVISION SUMMARY
  Added D-bus error management for several requests. Updated job status when needed in case of error.
  
  Aborted some jobs instead of marking them invalid, in order to give them a chance to reschedule. Other no-go situations mark the jobs invalid directly.
  
  Issued a warning when one of the jobs is using FINISH_LOOP, as this will prevent other jobs from scheduling. Will rework to update priority when there are other uncompleted jobs in the list.
  
  Prevented dawn verification when twilight check is disabled for a job. Besides, this allows daily testing in my basement :) Also fixed twilight enforcement on culmination-based jobs.
  
  Sometimes when pausing/restarting the scheduler, the state machine misses a step regarding mount parking state. Added a safeguard to unpark the mount when trying to slew, instead of waiting indefinitely for the end of an impossible slew.
  
  Updated log after checking altitude calculation to clarify situation.
  
  Stopped guiding when aborting a job and completing a looping job. Aborting a job should reset guiding, as we're not able to continue on the current target. Completing a looping job that is not guiding requires realignment.
  
  Also updated failure count management. Alignment now resets the mount model at the last attempt before failing, and only if the settings option is enabled. When alignment fails, job is aborted, not terminated, it could be passing clouds for instance. Successful alignment properly resets the failure count.
  
  Similarily, guiding now properly resets the failure count if successful.
  
  Similarily, capturing now restarts the capture stage when failing, or guiding stage if it is guiding that failed. When capture fails, job is aborted, not terminated, but it's unknown whether it is possible to recover from that failure. Successful capture properly resets the failure count.
  
  SchedulerJob now manages column resizing. This required the cell to be inserted in the table prior to be configured, but UI is not refreshing yet at this step. Now timestamps should format the table properly every time they are updated.
  
  SchedulerJob refactor, documentation. Moved getters to interface to clarify implementation. Added some cell updates that were missing for some fields.
  
  Add current scheduler job name and stage. This change displays the name and stage of the current job in the scheduler interface, so that the end-user knows what the scheduler is doing.
  
  Rework job states and refactor job reset. Keeping scores now that jobs are scheduled properly. START_ASAP jobs that are scheduled auto-switch to START_AT when given a start time, and reset to the original user setting.
  
  Refactored resetting jobs to original settings inside SchedulerJob, so that all resets behave the same.
  
  When the scheduler is stopped, jobs will abort and not restart. Jobs have to be reset using the evaluate button before they can restart. This is a safeguard to clean up weird states when pausing/resuming the scheduler.
  
  FIXME on leaving the mount to track while the scheduler is sleeping could result in problems if the end-user stops the scheduler or the system crashes. At the very least the mount should not be requested to track.
  FIXME on negative scores that are weird for the end-user. Probably as soon as a negative score is obtained, no further score evaluation should be attempted, just in case a subsequent one adds enough to return positive.
  FIXME on altitude cutoff that has an issue with rising targets, which will get aborted. Mitigated by a previous change which reschedules aborted jobs, but incorrect nonetheless.
  FIXME on manual execution of startup/shutdown scripts which probably requires INDI to be connected to succeed. Warning or notification should ensue properly.

TEST PLAN
  Same as previous differential. There are still some edge cases, plus one issue with the remote solver when Ekos shutdowns INDI while the solver is still working. Apparently the solver is stopped after INDI, leading to a crash.

REPOSITORY
  R321 KStars

REVISION DETAIL
  https://phabricator.kde.org/D12485

AFFECTED FILES
  kstars/ekos/scheduler/scheduler.cpp
  kstars/ekos/scheduler/scheduler.h
  kstars/ekos/scheduler/scheduler.ui
  kstars/ekos/scheduler/schedulerjob.cpp
  kstars/ekos/scheduler/schedulerjob.h

To: TallFurryMan, mutlaqja
Cc: #kde_edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180424/4c536b28/attachment.html>


More information about the kde-edu mailing list