Skip to content

Commit

Permalink
Make the max zoom to enqueue configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarianski committed Apr 3, 2017
1 parent a248db0 commit c6bf885
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config.yaml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ tiles:
# process on update
parent-zoom-until: 11

# this is the max zoom used when enqueueing the tiles of interest
enqueue_max_zoom: 15

process:
# number of simultaneous "querysets" to issue to the database. The
# query for each layer will be issued in parallel to the same
Expand Down
2 changes: 1 addition & 1 deletion tilequeue/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ def tilequeue_enqueue_tiles_of_interest(cfg, peripherals):
coords = []
for coord_int in tiles_of_interest:
coord = coord_unmarshall_int(coord_int)
if coord.zoom <= 15:
if coord.zoom <= cfg.enqueue_max_zoom:
coords.append(coord)

enqueuer = ThreadedEnqueuer(sqs_queue, cfg.seed_n_threads, logger)
Expand Down
3 changes: 3 additions & 0 deletions tilequeue/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def __init__(self, yml):
self.s3_path = self._cfg('store path')
self.s3_date_prefix = self._cfg('store date-prefix')

self.enqueue_max_zoom = self.yml['tiles']['enqueue_max_zoom']

seed_cfg = self.yml['tiles']['seed']
self.seed_all_zoom_start = seed_cfg['all']['zoom-start']
self.seed_all_zoom_until = seed_cfg['all']['zoom-until']
Expand Down Expand Up @@ -160,6 +162,7 @@ def default_yml_config():
'expired-location': None,
'parent-zoom-until': None,
},
'enqueue_max_zoom': 15,
},
'process': {
'n-simultaneous-query-sets': 0,
Expand Down

0 comments on commit c6bf885

Please sign in to comment.