Skip to content
Snippets Groups Projects
Commit e7176f14 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Allow subdirectories in job monikers.

parent e0d4f25a
No related branches found
No related tags found
No related merge requests found
...@@ -20,11 +20,17 @@ class BatchJob(object): ...@@ -20,11 +20,17 @@ class BatchJob(object):
import os import os
import os.path import os.path
self.moniker = moniker timestamp = datetime.now().strftime("%Y-%m-%d-%H%M")
self.moniker = (
moniker
.replace("-$DATE", "")
.replace("$DATE-", "")
.replace("$DATE", "")
.replace("/", "-"))
self.subdir = os.path.join( self.subdir = os.path.join(
os.getcwd(), os.getcwd(),
"%s-%s" % (moniker, datetime.now().strftime("%Y-%m-%d-%H%M%S"))) moniker.replace("$DATE", timestamp))
os.mkdir(self.subdir) os.makedirs(self.subdir)
with open("%s/run.sh" % self.subdir, "w") as runscript: with open("%s/run.sh" % self.subdir, "w") as runscript:
import sys import sys
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment