def return_file_names_to_query_in_the_current_execution(file_names_list):
    """Return the file names except the ones from the current invocation's date.

    Args:
        file_names_list (list): list of file names

    Returns:
        list: list of file names till midnight of that day.
    """
    __method_name = inspect.currentframe().f_code.co_name
    try:
        now = datetime.now(timezone.utc)
        one_hour_ago = now - timedelta(hours=1)
        files_to_query_in_current_execution = []
        for file in file_names_list:
            if file.isnumeric() and int(file) < int(one_hour_ago.timestamp()):
                files_to_query_in_current_execution.append(file)
        applogger.info(
            "{}(method={}) : {} : Found {} failed Indicators' File.".format(
                consts.LOGS_STARTS_WITH,
                __method_name,
                consts.RETRY_FAILED_INDICATORS,
                len(files_to_query_in_current_execution),
            )
        )
        return files_to_query_in_current_execution
    except Exception as error:
        applogger.error(
            "{}(method={}) : {} : Error in returning which files to process, Error : {}.".format(
                consts.LOGS_STARTS_WITH,
                __method_name,
                consts.RETRY_FAILED_INDICATORS,
                error,
            )
        )
        raise CofenseIntelligenceException()
Return the file names except the ones from the current invocation's date.

    Args:
        file_names_list (list): list of file names

    Returns:
        list: list of file names till midnight of that day.
    
Solutions/CofenseIntelligence/Data Connectors/CofenseIntelligenceDataConnector/RetryFailedIndicators/retry_failed_indicators.py