more superseded updates cleanup

This commit is contained in:
wh1te909 2021-02-02 01:12:20 +00:00
parent 9ef4c3bb06
commit 97766b3a57
1 changed files with 7 additions and 0 deletions

View File

@ -256,6 +256,13 @@ class NatsWinUpdates(APIView):
).save()
agent.delete_superseded_updates()
# more superseded updates cleanup
for u in agent.winupdates.filter(
date_installed__isnull=True, result="failed"
).exclude(installed=True):
u.delete()
return Response("ok")