(username, title, reason, ttl)
Adds a task with the given title to the ignore list for the given
    amount of time. Additionally adds an optional message to specify the
    reason that the alert was ignored.

    Args:
        username (str): The username of the user to ignore the given alert for.
        title (str): The title of the alert to ignore.
        ttl (Timedelta): The amount of time to ignore the alert for.
        msg (str): An optional string specifying why an alert was ignored
Adds a task with the given title to the ignore list for the given
    amount of time. Additionally adds an optional message to specify the
    reason that the alert was ignored.
Adds a task with the given title to the ignore list for the given amount of time . Additionally adds an optional message to specify the reason that the alert was ignored .
def ignore_task(username, title, reason, ttl):
    # type: (str, str, str, timedelta) -> None
    '''
    Adds a task with the given title to the ignore list for the given
    amount of time. Additionally adds an optional message to specify the
    reason that the alert was ignored.

    Args:
        username (str): The username of the user to ignore the given alert for.
        title (str): The title of the alert to ignore.
        ttl (Timedelta): The amount of time to ignore the alert for.
        msg (str): An optional string specifying why an alert was ignored
    '''
    expiry_time = datetime.now(tz=pytz.utc) + ttl
    # NB: Non-standard MySQL specific query
    SQLEngine.execute('''INSERT INTO ignored (ldap, title, reason, until)
    VALUES (%s, %s, %s, %s)
    ON DUPLICATE KEY UPDATE reason=VALUES(reason), until=VALUES(until)
    ''', (username, title, reason, expiry_time.strftime('%Y-%m-%d %H:%M:%S')))
def ignore_task ( username , title , reason , ttl ) : # type: (str, str, str, timedelta) -> None expiry_time = datetime . now ( tz = pytz . utc ) + ttl # NB: Non-standard MySQL specific query SQLEngine . execute ( '''INSERT INTO ignored (ldap, title, reason, until)
    VALUES (%s, %s, %s, %s)
    ON DUPLICATE KEY UPDATE reason=VALUES(reason), until=VALUES(until)
    ''' , ( username , title , reason , expiry_time . strftime ( '%Y-%m-%d %H:%M:%S' ) ) )