-
Notifications
You must be signed in to change notification settings - Fork 52
Description
Describe the bug
The single observation strategy RetryFailedObservationsStrategy in tom_observations does not update the DynamicCadence object associated with the observation group to set active = False upon completion. This causes the cadence to show up and clutter ./manage.py runcadencestrategies even though the observation is not active anymore upon completion. The strategy also does not update the observation group in the database to reflect the observation status from OCS. When an observation is submitted and ./manage.py runcadencestrategies is run, the observation does not reflect a 'PENDING' observation states. The repeating strategy (ResumeCadenceAfterFailureStrategy) does not reflect this bug and does update the status to PENDING and since it is only stopped on cancellation, it does not experience the issue with the DynamicCadence needing to be turned off upon a completed observation.
To Reproduce
Steps to reproduce the behavior:
- Go to a target page on TOM Demo or a fresh TOM that has the form
- Under "Observe" click on "LCO" then open the "Photometric Sequence" form, or select an observation template
- Select "Once in the next" or "RetryFailedObservationsStrategy" under "cadence strategy"
- Input observing parameters and submit
- Upon completion of the observation, the sequence will still appear in the Dynamic Cadence table and when running
./manage.py runcadencestrategies
Expected behavior
Upon observation request (or when runcadencestrategies is run), the ObservationRecord status should update from '' to 'PENDING'. Similarly updating to 'COMPLETE' upon completion. When the observation is complete, the DynamicCadence should be turned off. If a failure in the observation occurs, the observation should be re-requested with a shifted window and is only finished when a complete state is reached.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status