Add the jobid in the temp directory prefix

This is committed only for debugging purposes, to help us investigate
the file descriptors leak problem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
stable
Thomas Petazzoni 2012-04-16 11:30:00 +02:00
rodzic eb8f41d3d9
commit 668b02ae93
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -444,8 +444,12 @@ SELECT ST_AsText(ST_LongestLine(
osm_date = self.get_osm_database_last_update()
# Ugly way to get the job id, that we need for debugging
# purposes to get a useful name for the temporary directory.
jobid = file_prefix.split('_')[0]
# Create a temporary directory for all our shape files
tmpdir = tempfile.mkdtemp(prefix='ocitysmap')
tmpdir = tempfile.mkdtemp(prefix='ocitysmap-%d-', int(jobid))
try:
LOG.debug('Rendering in temporary directory %s' % tmpdir)