def __init__(self, app_config): self.app_config = app_config reporter = reporting.Reporter(app_config) recordings_buffer_size = app_config.no_processes * 4 # only this number of recordings will be acquired self.recordings_q = multiprocessing.Queue( recordings_buffer_size) # limited size of a queue self.output_q = multiprocessing.Queue() self.process_in = multiprocessing.Process( target=s3connection.RecordingsFetcher().get_recordings, args=(app_config, self.recordings_q)) self.process_out = multiprocessing.Process( target=reporter.write_results_parallel, args=(self.output_q, )) self.process_kiwi = [ multiprocessing.Process(target=self.worker, args=()) for i in range(app_config.no_processes) ]
def __init__(self, app_config): self.app_config = app_config self.reporter = reporting.Reporter(app_config) self.kiwi_finder = identification.KiwiFinder(app_config) self.noise_remover = noise_reduction.NoiseRemover() self.fetcher = s3connection.RecordingsFetcher()