def __init__(self, task, worker_pool, handle_stale=False, handle_uncached=False, work_on_metatiles=True, skip_geoms_for_last_levels=0, progress_logger=None, seed_progress=None):
    self.tile_mgr = task.tile_manager
    self.task = task
    self.worker_pool = worker_pool
    self.handle_stale = handle_stale
    self.handle_uncached = handle_uncached
    self.work_on_metatiles = work_on_metatiles
    self.skip_geoms_for_last_levels = skip_geoms_for_last_levels
    self.progress_logger = progress_logger
    num_seed_levels = len(task.levels)
    if (num_seed_levels >= 4):
        self.report_till_level = task.levels[(num_seed_levels - 2)]
    else:
        self.report_till_level = task.levels[(num_seed_levels - 1)]
    meta_size = (self.tile_mgr.meta_grid.meta_size if self.tile_mgr.meta_grid else (1, 1))
    self.tiles_per_metatile = (meta_size[0] * meta_size[1])
    self.grid = MetaGrid(self.tile_mgr.grid, meta_size=meta_size, meta_buffer=0)
    self.count = 0
    self.seed_progress = (seed_progress or SeedProgress())
    self.seeded_tiles = {l: deque(maxlen=64) for l in task.levels}
def __init__(self, task, worker_pool, handle_stale=False, handle_uncached=False, work_on_metatiles=True, skip_geoms_for_last_levels=0, progress_logger=None, seed_progress=None):
    self.tile_mgr = task.tile_manager
    self.task = task
    self.worker_pool = worker_pool
    self.handle_stale = handle_stale
    self.handle_uncached = handle_uncached
    self.work_on_metatiles = work_on_metatiles
    self.skip_geoms_for_last_levels = skip_geoms_for_last_levels
    self.progress_logger = progress_logger
    num_seed_levels = len(task.levels)
    if (num_seed_levels >= 4):
        self.report_till_level = task.levels[(num_seed_levels - 2)]
    else:
        self.report_till_level = task.levels[(num_seed_levels - 1)]
    meta_size = (self.tile_mgr.meta_grid.meta_size if self.tile_mgr.meta_grid else (1, 1))
    self.tiles_per_metatile = (meta_size[0] * meta_size[1])
    self.grid = MetaGrid(self.tile_mgr.grid, meta_size=meta_size, meta_buffer=0)
    self.count = 0
    self.seed_progress = (seed_progress or SeedProgress())
    self.seeded_tiles = {l: deque(maxlen=64) for l in task.levels}