[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH maposmatic] Provide a map_areas_prefix to the OC
From: |
Maxime Petazzoni |
Subject: |
[Maposmatic-dev] [PATCH maposmatic] Provide a map_areas_prefix to the OCitySMap constructors |
Date: |
Sat, 23 Jan 2010 15:34:09 +0100 |
Following the API change in OCitySMap to improve paralellization of
OCitySMap rendering processes, we now need to provide the prefix to the
map_areas table name. We use here 'maposmaticd_PID_'.
---
scripts/maposmaticd | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/maposmaticd b/scripts/maposmaticd
index 4464913..5f6cdbd 100755
--- a/scripts/maposmaticd
+++ b/scripts/maposmaticd
@@ -36,15 +36,15 @@ def sigcld_handler(signum, frame, pipe_write):
f.write("end")
def render_job_process(job):
+ prefix = 'maposmaticd_%d_' % os.getpid()
if job.administrative_osmid is None:
bbox = OCMBoundingBox(job.lat_upper_left, job.lon_upper_left,
job.lat_bottom_right, job.lon_bottom_right)
- renderer = OCitySMap(config_file=OCITYSMAP_CFG_PATH, boundingbox=bbox,
- language=job.map_language)
+ renderer = OCitySMap(config_file=OCITYSMAP_CFG_PATH,
map_areas_prefix=prefix,
+ boundingbox=bbox, language=job.map_language)
else:
- renderer = OCitySMap(config_file=OCITYSMAP_CFG_PATH,
- osmid=job.administrative_osmid,
- language=job.map_language)
+ renderer = OCitySMap(config_file=OCITYSMAP_CFG_PATH,
map_areas_prefix=prefix,
+ osmid=job.administrative_osmid,
language=job.map_language)
outfile_prefix = os.path.join(RENDERING_RESULT_PATH, job.files_prefix())
--
1.6.3.3.277.g88938c