Garbage collect scratch dir left-overs. (#573)

master
Christoph Schütte 2017-11-06 13:21:35 +01:00 committed by GitHub
parent b665fbd6d2
commit f6a8903a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -167,6 +167,10 @@ class Job(object):
def run(self, ros_distro, run_id):
"""Runs the job with ROS distro 'ros_distro'."""
print 'running job {}'.format(self.id)
# Garbage collect any left-overs from previous runs.
run_cmd('rm -rf /data/*')
# Copy the rosbag to scratch space
scratch_dir = '/data/{}'.format(self.id)
rosbag_filename = basename(self.rosbag)