@decorators.daily()
def clean_groundtracks(threshold=misc.get_now_utc()):
    logger.info('>>> Cleaning groundtracks')

    try:

        no_deleted = gt_models.GroundTrack.objects.delete_older(
            threshold
        ).delete()
        logger.debug('>>> tasks@clean_passes.filtered = ' + str(no_deleted))

    except Exception as ex:

        logger.exception(
            '>>> Exception cleaning groundtracks, ex = ' + str(ex), ex
        )
        return

    logger.info('>>> DONE cleaning groundtracks')
Periodic groundtracks cleanup
dataset/ETHPy150Open satnet-project/server/services/simulation/periodictasks.py/clean_groundtracks