diff --git a/igneous/task_execution.py b/igneous/task_execution.py index aae48c0d..ffab1133 100755 --- a/igneous/task_execution.py +++ b/igneous/task_execution.py @@ -9,7 +9,7 @@ from taskqueue import TaskQueue from igneous import EmptyVolumeException -from igneous import logger +#from igneous import logger from igneous.secrets import QUEUE_NAME, QUEUE_TYPE, SQS_URL, LEASE_SECONDS @@ -78,16 +78,19 @@ def execute(tag, queue, server, qurl, loop): task.execute() print("delete task in queue...") tq.delete(task) - logger.log('INFO', task , "succesfully executed") + #logger.log('INFO', task , "succesfully executed") + print("successfully executed") tries = 0 except TaskQueue.QueueEmpty: time.sleep(random_exponential_window_backoff(tries)) continue except EmptyVolumeException: - logger.log('WARNING', task, "raised an EmptyVolumeException") - tq.delete(task) + #logger.log('WARNING', task, "raised an EmptyVolumeException") + print('raised an EmptyVolumeException') + raise + #tq.delete(task) except Exception as e: - logger.log('ERROR', task, "raised {}\n {}".format(e , traceback.format_exc())) + #logger.log('ERROR', task, "raised {}\n {}".format(e , traceback.format_exc())) raise #this will restart the container in kubernetes if (not loop) or (not LOOP): print("not in loop mode, will break the loop and exit") diff --git a/igneous/tasks.py b/igneous/tasks.py index a5fcf6b4..18d65f64 100755 --- a/igneous/tasks.py +++ b/igneous/tasks.py @@ -1344,8 +1344,8 @@ def _mask_output(self): assert np.any(self.output) def _read_image(self): - self.image_vol = CloudVolume(self.image_layer_path, bounded=False, - fill_missing=False, progress=True, + self.image_vol = CloudVolume(self.image_layer_path, bounded=True, + fill_missing=True, progress=True, mip=self.image_mip, parallel=False) output_slices = self.output_bounds.to_slices() self.input_slices = tuple(slice(s.start - m, s.stop + m) for s, m in @@ -1422,8 +1422,8 @@ def _validate_image(self): content_type='application/json') raise Exception("detected a black box by template matching!") - validate_vol = CloudVolume(self.image_layer_path, bounded=False, - fill_missing=False, progress=True, + validate_vol = CloudVolume(self.image_layer_path, bounded=True, + fill_missing=True, progress=True, mip=self.image_validate_mip, parallel=False) validate_image = validate_vol[validate_bbox.to_slices()] assert validate_image.shape[3] == 1