(export_instance, page_number, dump_path, doc_count, attempts)
Log any exceptions here since logging on the other side of the process queue
    won't show the traceback
Log any exceptions here since logging on the other side of the process queue
    won't show the traceback
Log any exceptions here since logging on the other side of the process queue won t show the traceback
def run_export_with_logging(export_instance, page_number, dump_path, doc_count, attempts):
    """Log any exceptions here since logging on the other side of the process queue
    won't show the traceback
    """
    logger.info('    Processing page {} started (attempt {})'.format(page_number, attempts))
    progress_queue = getattr(run_export_with_logging, 'queue', None)
    update_frequency = min(1000, int(doc_count // 10) or 1)
    progress_tracker = LoggingProgressTracker(page_number, progress_queue, update_frequency)
    try:
        result = run_export(export_instance, page_number, dump_path, doc_count, progress_tracker)
        if progress_queue:
            # just to make sure we set progress to 100%
            progress_queue.put(ProgressValue(page_number, doc_count, doc_count))
        logger.info('    Processing page {} complete'.format(page_number))
        return result
    except Exception:
        logger.exception("Error processing page {} (attempt {})".format(page_number, attempts))
        raise
def run_export_with_logging ( export_instance , page_number , dump_path , doc_count , attempts ) : logger . info ( '    Processing page {} started (attempt {})' . format ( page_number , attempts ) ) progress_queue = getattr ( run_export_with_logging , 'queue' , None ) update_frequency = min ( 1000 , int ( doc_count // 10 ) or 1 ) progress_tracker = LoggingProgressTracker ( page_number , progress_queue , update_frequency ) try : result = run_export ( export_instance , page_number , dump_path , doc_count , progress_tracker ) if progress_queue : # just to make sure we set progress to 100% progress_queue . put ( ProgressValue ( page_number , doc_count , doc_count ) ) logger . info ( '    Processing page {} complete' . format ( page_number ) ) return result except Exception : logger . exception ( "Error processing page {} (attempt {})" . format ( page_number , attempts ) ) raise