def __init__(self, root, buckets=spawn.BUCKETS, max_per_bucket=spawn.MAX_PER_BUCKET): self.buckets = buckets self.paths = spawn.SpawnPaths(root, buckets) self.max_per_bucket = max_per_bucket
def __init__(self, root, buckets=spawn.BUCKETS): self.paths = spawn.SpawnPaths(root, buckets) fs.mkdir_safe(self.paths.manifest_dir) os.chmod(self.paths.manifest_dir, 0o1777) tmp_path = os.path.join(self.paths.manifest_dir, '.tmp') fs.mkdir_safe(tmp_path) os.chmod(tmp_path, 0o1777)
def test_get_instance_path_with_dot(self): """Tests that getting the instance path works correctly with a '.'.""" paths = spawn.SpawnPaths('/does/not/exist', 1) job, bucket, running = utils.get_instance_path('test.dot.yml', paths) self.assertEqual(job, '/does/not/exist/apps/jobs/test.dot') self.assertEqual(bucket, '/does/not/exist/running/000000') self.assertEqual(running, '/does/not/exist/running/000000/test.dot') job, bucket, running = utils.get_instance_path('test.dot', paths) self.assertEqual(job, '/does/not/exist/apps/jobs/test.dot') self.assertEqual(bucket, '/does/not/exist/running/000000') self.assertEqual(running, '/does/not/exist/running/000000/test.dot')
def __init__(self, root, buckets=spawn.BUCKETS): self.paths = spawn.SpawnPaths(root, buckets) fs.mkdir_safe(self.paths.cleanup_dir)
def __init__(self, root, buckets=spawn.BUCKETS): self.paths = spawn.SpawnPaths(root, buckets) fs.mkdir_safe(self.paths.manifest_dir) os.chmod(self.paths.manifest_dir, 0o1777)