* David MENTRE <[email protected]> [2012-04-24 08:26:19]:

> Hello Thomas,
> 
> 2012/4/23 Thomas Petazzoni <[email protected]>:
> >> In fact, a better solution would be to keep the jobid in the temp
> >> directory, this one without the ugly hack. I don't want to do this
> >> right now. :-)
> >
> > The problem is that ocitysmap doesn't know anything about job id. Job
> > id is something that MapOSMatic and its rendering daemon know about,
> > but not ocitysmap.
> 
> Hmm OK. I need to look at the code then to find a better solution.

My suggestion is to have an optional jobid field in the
RenderingConfiguration (ocitysmap2/__init__.py), set my MapOSMatic in
scripts/render.py when creating the RenderingConfiguration, but not
necessarily by OCitySMap (like in ocitysmap2-render for example).

Then, you simply do:

  tmpdir = tempfile.mkdtemp(prefix='ocitysmap-%s' %
    (config.jobid and '%d-' % config.jobid or ''))

Boom. I'll let you write the patch and submit it, I need to go.

/Max
-- 
Maxime Petazzoni <http://www.bulix.org>
 ``One by one, the penguins took away my sanity.''
Writing software in California

Attachment: signature.asc
Description: Digital signature

Reply via email to