diff --git a/igneous/task_creation/skeleton.py b/igneous/task_creation/skeleton.py index 0c6c3901..b6829c0c 100644 --- a/igneous/task_creation/skeleton.py +++ b/igneous/task_creation/skeleton.py @@ -349,7 +349,8 @@ def create_sharded_skeleton_merge_tasks( ShardedSkeletonMergeTask( layer_path, shard_no, dust_threshold, tick_threshold, - max_cable_length=max_cable_length + max_cable_length=max_cable_length, + spatial_index_db=spatial_index_db, ) for shard_no in shard_labels.keys() ] diff --git a/igneous/tasks/skeleton.py b/igneous/tasks/skeleton.py index fa41449b..419ad52d 100644 --- a/igneous/tasks/skeleton.py +++ b/igneous/tasks/skeleton.py @@ -313,11 +313,11 @@ class ShardedSkeletonMergeTask(RegisteredTask): def __init__( self, cloudpath, shard_no, dust_threshold=4000, tick_threshold=6000, - sqlite_db=None, max_cable_length=None + spatial_index_db=None, max_cable_length=None ): super(ShardedSkeletonMergeTask, self).__init__( cloudpath, shard_no, - dust_threshold, tick_threshold, sqlite_db, + dust_threshold, tick_threshold, spatial_index_db, max_cable_length ) self.progress = False @@ -326,7 +326,11 @@ def __init__( def execute(self): # cache is necessary for local computation, but on GCE download is very fast # so cache isn't necessary. - cv = CloudVolume(self.cloudpath, cache=False, progress=self.progress) + cv = CloudVolume( + self.cloudpath, + progress=self.progress, + spatial_index_db=self.spatial_index_db + ) # This looks messy because we are trying to avoid retaining # unnecessary memory. In the original iteration, this was @@ -432,8 +436,6 @@ def get_unfused(self, labels, filenames, cv): def locations_for_labels(self, labels, cv): SPATIAL_EXT = re.compile(r'\.spatial$') - if self.sqlite_db: - cv.skeleton.spatial_index.sqlite_db = self.sqlite_db index_filenames = cv.skeleton.spatial_index.file_locations_per_label(labels) for label, locations in index_filenames.items(): for i, location in enumerate(locations):