Support configurable render timeout

feature/motorway_junction
lukasmartinelli 2016-06-22 21:45:38 +02:00
rodzic 9511712729
commit 3958b87699
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -106,6 +106,7 @@ export-worker:
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}" AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
AWS_S3_HOST: "${AWS_S3_HOST}" AWS_S3_HOST: "${AWS_S3_HOST}"
BUCKET_NAME: "osm2vectortiles-testing" BUCKET_NAME: "osm2vectortiles-testing"
RENDER_TIMEOUT: "1200"
export: export:
image: "osm2vectortiles/export" image: "osm2vectortiles/export"
command: ./export-local.sh command: ./export-local.sh

Wyświetl plik

@ -165,7 +165,9 @@ def handle_message(tm2source, bucket, s3_url, body):
else: else:
raise ValueError("Message must be either of type pyramid or list") raise ValueError("Message must be either of type pyramid or list")
_, render_time = timing(subprocess.check_call, tilelive_cmd, timeout=5*60) render_timeout = int(os.getenv('RENDER_TIMEOUT', 5 * 60))
_, render_time = timing(subprocess.check_call, tilelive_cmd,
timeout=render_timeout)
print('Render MBTiles: {}'.format(naturaltime(render_time))) print('Render MBTiles: {}'.format(naturaltime(render_time)))
_, optimize_time = timing(optimize_mbtiles, mbtiles_file) _, optimize_time = timing(optimize_mbtiles, mbtiles_file)