(domain, days)
return CaseES().domain(domain).modified_range(lt=then).is_closed(False).count()
Returns the number of open cases that have been modified in the last <days> days
Returns the number of open cases that have been modified in the last <days> days
Returns the number of open cases that have been modified in the last <days > days
def inactive_cases_in_last(domain, days):
    """
    Returns the number of open cases that have been modified in the last <days> days
    """
    now = datetime.utcnow()
    then = json_format_datetime(now - timedelta(days=int(days)))

    return CaseES().domain(domain).modified_range(lt=then).is_closed(False).count()
def inactive_cases_in_last ( domain , days ) : now = datetime . utcnow ( ) then = json_format_datetime ( now - timedelta ( days = int ( days ) ) ) return CaseES ( ) . domain ( domain ) . modified_range ( lt = then ) . is_closed ( False ) . count ( )