[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH maposmatic 9/9] Provide a map_areas prefix to th
From: |
Maxime Petazzoni |
Subject: |
[Maposmatic-dev] [PATCH maposmatic 9/9] Provide a map_areas prefix to the TimingOutJobRenderer |
Date: |
Sun, 24 Jan 2010 14:43:23 +0100 |
---
scripts/daemon.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/scripts/daemon.py b/scripts/daemon.py
index d14cbf6..9ff44b7 100755
--- a/scripts/daemon.py
+++ b/scripts/daemon.py
@@ -93,18 +93,20 @@ class MapOSMaticDaemon:
Returns True if the rendering was successful, False otherwise.
"""
- return self.render(job)
+ return self.render(job, 'maposmaticd_%d_' % os.getpid())
- def render(self, job):
+ def render(self, job, prefix=None):
"""Render the given job using a timing out job renderer.
Args:
job (MapRenderingJob): the job to process and render.
+ prefix (string): the map_areas table prefix used by the
+ renderer for this job.
Returns True if the rendering was successful, False otherwise.
"""
- renderer = render.TimingOutJobRenderer(job)
+ renderer = render.TimingOutJobRenderer(job, prefix=prefix)
job.start_rendering()
ret = renderer.run()
job.end_rendering(_RESULT_MSGS[ret])
@@ -123,7 +125,7 @@ class ProcessingMapOSMaticDaemon(MapOSMaticDaemon):
self.__pool = multiprocessing.Pool(n_workers)
def dispatch(self, job):
- # self.__pool.apply_async(self.render, job)
+ # self.__pool.apply_async(self.render, job, some_prefix)
raise NotImplementedError
class SubprocessMapOSMaticDaemon(MapOSMaticDaemon):
--
1.6.3.3.277.g88938c
- [Maposmatic-dev] MapOSMatic daemon rewrite, Maxime Petazzoni, 2010/01/24
- [Maposmatic-dev] [PATCH maposmatic 1/9] Improve the file cleanup mechanism, Maxime Petazzoni, 2010/01/24
- [Maposmatic-dev] [PATCH maposmatic 2/9] Cornerstones for a new MapOSMatic daemon, Maxime Petazzoni, 2010/01/24
- [Maposmatic-dev] [PATCH maposmatic 3/9] Update the .gitignore list, Maxime Petazzoni, 2010/01/24
- [Maposmatic-dev] [PATCH maposmatic 4/9] Add MAPOSMATIC_LOG_LEVEL to the environment wrapping, Maxime Petazzoni, 2010/01/24
- [Maposmatic-dev] [PATCH maposmatic 5/9] Merge the StandaloneMapOSMaticDaemon into the base MapOSMaticDaemon class, Maxime Petazzoni, 2010/01/24
- [Maposmatic-dev] [PATCH maposmatic 6/9] Revamp the job renderer, Maxime Petazzoni, 2010/01/24
- [Maposmatic-dev] [PATCH maposmatic 7/9] Rework the daemon to use the new JobRenderers, Maxime Petazzoni, 2010/01/24
- [Maposmatic-dev] [PATCH maposmatic 8/9] Frequency parameters passing improvement, Maxime Petazzoni, 2010/01/24
- [Maposmatic-dev] [PATCH maposmatic 9/9] Provide a map_areas prefix to the TimingOutJobRenderer,
Maxime Petazzoni <=