src/dirbs/cli/classify.py
def _completed_calc_jobs(futures_to_condition, per_condition_state, logger):
    """
    Function to process the IMEI calculation jobs and yield results once a condition is completed.

    :param futures_to_condition: list of condition futures
    :param per_condition_state: list of condition states
    :param logger: dirbs logger instance
    """
    for f in futures.as_completed(futures_to_condition):
        num_matched_imeis, duration = f.result()
        condition = futures_to_condition[f]
        state = per_condition_state[condition.label]
        state['num_completed_calc_jobs'] += 1
        state['num_matched_imeis'] += num_matched_imeis
        logger.debug("Processed {0:d} of {1:d} jobs to calculate matching IMEIs for condition \'{2}\' "
                     '(duration {3:.3f}s)'
                     .format(state['num_completed_calc_jobs'],
                             state['num_total_calc_jobs'],
                             condition.label,
                             duration / 1000))

        if state['num_completed_calc_jobs'] == state['num_total_calc_jobs']:
            logger.info("Finished calculating {0:d} matching IMEIs for condition \'{1}\'"
                        .format(state['num_matched_imeis'], condition.label))
            yield condition, state

    Function to process the IMEI calculation jobs and yield results once a condition is completed.

    :param futures_to_condition: list of condition futures
    :param per_condition_state: list of condition states
    :param logger: dirbs logger instance
    
Function to process the IMEI calculation jobs and yield results once a condition is completed.
Function to process the IMEI calculation jobs and yield results once a condition is completed .
def _completed_calc_jobs(futures_to_condition, per_condition_state, logger):
    for f in futures.as_completed(futures_to_condition):
        num_matched_imeis, duration = f.result()
        condition = futures_to_condition[f]
        state = per_condition_state[condition.label]
        state['num_completed_calc_jobs'] += 1
        state['num_matched_imeis'] += num_matched_imeis
        logger.debug("Processed {0:d} of {1:d} jobs to calculate matching IMEIs for condition \'{2}\' "
                     '(duration {3:.3f}s)'
                     .format(state['num_completed_calc_jobs'],
                             state['num_total_calc_jobs'],
                             condition.label,
                             duration / 1000))
        if state['num_completed_calc_jobs'] == state['num_total_calc_jobs']:
            logger.info("Finished calculating {0:d} matching IMEIs for condition \'{1}\'"
                        .format(state['num_matched_imeis'], condition.label))
            yield condition, state
def _completed_calc_jobs ( futures_to_condition , per_condition_state , logger ) : for f in futures . as_completed ( futures_to_condition ) : num_matched_imeis , duration = f . result ( ) condition = futures_to_condition [ f ] state = per_condition_state [ condition . label ] state [ 'num_completed_calc_jobs' ] += 1 state [ 'num_matched_imeis' ] += num_matched_imeis logger . debug ( "Processed {0:d} of {1:d} jobs to calculate matching IMEIs for condition \'{2}\' " '(duration {3:.3f}s)' . format ( state [ 'num_completed_calc_jobs' ] , state [ 'num_total_calc_jobs' ] , condition . label , duration / 1000 ) ) if state [ 'num_completed_calc_jobs' ] == state [ 'num_total_calc_jobs' ] : logger . info ( "Finished calculating {0:d} matching IMEIs for condition \'{1}\'" . format ( state [ 'num_matched_imeis' ] , condition . label ) ) yield condition , state
Function to process the IMEI calculation jobs and yield results once a condition is completed.
Function to process the IMEI calculation jobs and yield results once a condition is completed .
"""
    Function to process the IMEI calculation jobs and yield results once a condition is completed.

    :param futures_to_condition: list of condition futures
    :param per_condition_state: list of condition states
    :param logger: dirbs logger instance
    """
futures_to_condition
list of condition futures
list of condition futures
per_condition_state
list of condition states
list of condition states
logger
dirbs logger instance
dirbs logger instance