@periodic_task(run_every=crontab(hour=0, minute=0), queue='case_rule_queue', ignore_result=True)
def delete_old_rule_submission_logs():
    start = datetime.utcnow()
    max_age = (start - timedelta(days=90))
    CaseRuleSubmission.objects.filter(created_on__lt=max_age).delete()
@periodic_task(run_every=crontab(hour=0, minute=0), queue='case_rule_queue', ignore_result=True)
def delete_old_rule_submission_logs():
    start = datetime.utcnow()
    max_age = (start - timedelta(days=90))
    CaseRuleSubmission.objects.filter(created_on__lt=max_age).delete()