bugfix for not creating dirs
This commit is contained in:
parent
958109a90b
commit
c188616917
12
strpc/rpc.py
12
strpc/rpc.py
@ -26,15 +26,21 @@ class STRpcRunnerService(object):
|
|||||||
self.jobs = []
|
self.jobs = []
|
||||||
self.running = True
|
self.running = True
|
||||||
self.dockerpath = None
|
self.dockerpath = None
|
||||||
|
|
||||||
log.info("strpcd starting up on %s" % self.hostname)
|
log.info("strpcd starting up on %s out of directory %s" % (
|
||||||
|
self.hostname, self.dir)
|
||||||
|
)
|
||||||
|
|
||||||
if not os.path.isdir(self.dir):
|
if not os.path.isdir(self.dir):
|
||||||
raise Exception("STRPC base directory not found")
|
raise Exception("STRPC base directory not found")
|
||||||
self.setup()
|
self.setup()
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
|
log.info("creating dir %s if not exist" % self.hostdir)
|
||||||
|
pathlib.Path(self.hostdir).mkdir(parents=True, exist_ok=True)
|
||||||
|
log.info("creating dir %s if not exist" % self.jobdir)
|
||||||
pathlib.Path(self.jobdir).mkdir(parents=True, exist_ok=True)
|
pathlib.Path(self.jobdir).mkdir(parents=True, exist_ok=True)
|
||||||
|
log.info("creating dir %s if not exist" % self.logdir)
|
||||||
pathlib.Path(self.logdir).mkdir(parents=True, exist_ok=True)
|
pathlib.Path(self.logdir).mkdir(parents=True, exist_ok=True)
|
||||||
self.write_status_file()
|
self.write_status_file()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user