Sync status information is lost after cleaning up old tasks related to sync.
Description of problem:
Sync status information is lost after cleaning up old tasks related to sync. For an example -
Suppose we synced five repository 7 days ago and if we go ahead and delete the tasks which were generated during the sync, The status will change from Syncing Complete to Never Synced in Sync Status page of Satellite WebUI.
Version-Release number of selected component (if applicable):
How reproducible: 100%Steps to Reproduce:
1. Sync any repository, once synced its status will show as Syncing Complete in Sync Status page of Satellite WebUI.
2. Now go ahead and delete that particular task using task id-
- foreman-rake foreman_tasks:cleanup TASK_SEARCH='id = 4fbe2626-9378-49f4-9923-d86c43cc80e7' VERBOSE=true
3. Now go ahead and check the Sync Status page of Satellite WebUI, that particular repository's status will get changed to Never Synced.
Actual results: Sync status shows as Never Synced
Expected results: Sync status should be shown as Syncing Complete