def default_time(): batch = Batch(self.batch_csv, pipeline_options=self.pipeline_options) start = timer() batch.run() end = timer() return end - start
def custom_sleep_time(): batch = Batch(self.batch_csv, sleep=3, pipeline_options=self.pipeline_options) start = timer() batch.run() end = timer() return end - start
def test_batch_with_batch_post_processor(self): def say_hi(batch): return "Hi!" batch = Batch(self.batch_csv, post_task=say_hi) rv = batch.run() self.assertFalse(rv)
def test_batch_with_pipeline_post_process_handler(self): def say_hi(pipeline): return "Hi!" batch = Batch(self.batch_csv, pipeline_post_task=say_hi) rv = batch.run() self.assertFalse(rv)
def test_batch_with_batch_post_processor(self): def say_hi(batch): return 'Hi!' batch = Batch(self.batch_csv, post_task=say_hi) rv = batch.run() self.assertFalse(rv)
def test_batch_with_pipeline_post_process_handler(self): def say_hi(pipeline): return 'Hi!' batch = Batch(self.batch_csv, pipeline_post_task=say_hi) rv = batch.run() self.assertFalse(rv)
def test_batch_with_batch_post_processor(self): def say_hi(batch): return 'Hi!' batch = Batch(self.batch_csv, post_task=say_hi, pipeline_options=self.pipeline_options) rv = batch.run() self.assertFalse(rv)
def custom_sleep_time(): batch = Batch(self.batch_csv, sleep=3) start = timer(); batch.run(); end = timer() return end - start
def default_time(): batch = Batch(self.batch_csv) start = timer(); batch.run(); end = timer() return end - start
def custom_sleep_time(): batch = Batch(self.batch_csv, sleep=3, pipeline_options=self.pipeline_options) start = timer(); batch.run(); end = timer() return end - start
def default_time(): batch = Batch(self.batch_csv, pipeline_options=self.pipeline_options) start = timer(); batch.run(); end = timer() return end - start