diff options
author | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2015-10-15 14:38:55 +0100 |
---|---|---|
committer | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2015-10-15 14:38:55 +0100 |
commit | aa504e79d622f4a30f7d0042ba8408e71d39268d (patch) | |
tree | 2fb088da49e577e878eeeeea974c671447c09205 | |
parent | a804435a4b62e3784415998dbe4c4ccaf69bb359 (diff) | |
download | ybd-nested-tmp.tar.gz |
Try nesting tmpnested-tmp
-rw-r--r-- | ybd/app.py | 6 | ||||
-rw-r--r-- | ybd/assembly.py | 1 |
2 files changed, 7 insertions, 0 deletions
@@ -196,8 +196,14 @@ def elapsed(starttime): def spawn(): + import tempfile + tempfile.tempdir = app.config['tmp'] for fork in range(1, config.get('instances')): if os.fork() == 0: config['fork'] = fork log('FORKS', 'I am fork', config.get('fork')) + tmpdir = tempfile.mkdtemp() + app.config['tmp'] = tmpdir break + tmpdir = tempfile.mkdtemp() + app.config['tmp'] = tmpdir diff --git a/ybd/assembly.py b/ybd/assembly.py index 0e3cb3e..a4125d1 100644 --- a/ybd/assembly.py +++ b/ybd/assembly.py @@ -39,6 +39,7 @@ class RetryException(Exception): str(l.fileno())]) app.config['last-retry'] = datetime.datetime.now() app.config['last-retry-component'] = component + shutil.rmtree(os.path.join(config['tmp'])) pass |