@no_result_task(queue='case_rule_queue', acks_late=True, soft_time_limit=(15 * settings.CELERY_TASK_SOFT_TIME_LIMIT))
def reset_and_backfill_deduplicate_rule_task(domain, rule_id):
    if (not CASE_DEDUPE.enabled(domain)):
        return
    try:
        rule = AutomaticUpdateRule.objects.get(id=rule_id, domain=domain, workflow=AutomaticUpdateRule.WORKFLOW_DEDUPLICATE, active=True, deleted=False)
    except AutomaticUpdateRule.DoesNotExist:
        return
    AutomaticUpdateRule.clear_caches(rule.domain, AutomaticUpdateRule.WORKFLOW_DEDUPLICATE)
    reset_deduplicate_rule(rule)
    backfill_deduplicate_rule(domain, rule)
@no_result_task(queue='case_rule_queue', acks_late=True, soft_time_limit=(15 * settings.CELERY_TASK_SOFT_TIME_LIMIT))
def reset_and_backfill_deduplicate_rule_task(domain, rule_id):
    if (not CASE_DEDUPE.enabled(domain)):
        return
    try:
        rule = AutomaticUpdateRule.objects.get(id=rule_id, domain=domain, workflow=AutomaticUpdateRule.WORKFLOW_DEDUPLICATE, active=True, deleted=False)
    except AutomaticUpdateRule.DoesNotExist:
        return
    AutomaticUpdateRule.clear_caches(rule.domain, AutomaticUpdateRule.WORKFLOW_DEDUPLICATE)
    reset_deduplicate_rule(rule)
    backfill_deduplicate_rule(domain, rule)