Skip to content

Commit 5127aec

Browse files
committed
remove logger; remove fill_missing flag since there is no image outside of the volume bounds
1 parent 6f147a7 commit 5127aec

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

igneous/task_execution.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from taskqueue import TaskQueue
1010

1111
from igneous import EmptyVolumeException
12-
from igneous import logger
12+
#from igneous import logger
1313

1414
from igneous.secrets import QUEUE_NAME, QUEUE_TYPE, SQS_URL, LEASE_SECONDS
1515

@@ -78,16 +78,19 @@ def execute(tag, queue, server, qurl, loop):
7878
task.execute()
7979
print("delete task in queue...")
8080
tq.delete(task)
81-
logger.log('INFO', task , "succesfully executed")
81+
#logger.log('INFO', task , "succesfully executed")
82+
print("successfully executed")
8283
tries = 0
8384
except TaskQueue.QueueEmpty:
8485
time.sleep(random_exponential_window_backoff(tries))
8586
continue
8687
except EmptyVolumeException:
87-
logger.log('WARNING', task, "raised an EmptyVolumeException")
88-
tq.delete(task)
88+
#logger.log('WARNING', task, "raised an EmptyVolumeException")
89+
print('raised an EmptyVolumeException')
90+
raise
91+
#tq.delete(task)
8992
except Exception as e:
90-
logger.log('ERROR', task, "raised {}\n {}".format(e , traceback.format_exc()))
93+
#logger.log('ERROR', task, "raised {}\n {}".format(e , traceback.format_exc()))
9194
raise #this will restart the container in kubernetes
9295
if (not loop) or (not LOOP):
9396
print("not in loop mode, will break the loop and exit")

igneous/tasks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,8 +1344,8 @@ def _mask_output(self):
13441344
assert np.any(self.output)
13451345

13461346
def _read_image(self):
1347-
self.image_vol = CloudVolume(self.image_layer_path, bounded=False,
1348-
fill_missing=False, progress=True,
1347+
self.image_vol = CloudVolume(self.image_layer_path, bounded=True,
1348+
fill_missing=True, progress=True,
13491349
mip=self.image_mip, parallel=False)
13501350
output_slices = self.output_bounds.to_slices()
13511351
self.input_slices = tuple(slice(s.start - m, s.stop + m) for s, m in
@@ -1422,8 +1422,8 @@ def _validate_image(self):
14221422
content_type='application/json')
14231423
raise Exception("detected a black box by template matching!")
14241424

1425-
validate_vol = CloudVolume(self.image_layer_path, bounded=False,
1426-
fill_missing=False, progress=True,
1425+
validate_vol = CloudVolume(self.image_layer_path, bounded=True,
1426+
fill_missing=True, progress=True,
14271427
mip=self.image_validate_mip, parallel=False)
14281428
validate_image = validate_vol[validate_bbox.to_slices()]
14291429
assert validate_image.shape[3] == 1

0 commit comments

Comments
 (0)