diff options
-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 |