Skip to content

Commit

Permalink
Fix a bug where new run with -s existing does not update the meta dat…
Browse files Browse the repository at this point in the history
…abase as necessary
  • Loading branch information
gaow committed May 22, 2020
1 parent 891665d commit 8f01b9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dsc_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self,
for kk in runtime.groups[k]:
host_conf[kk] = host_conf[k]
del host_conf[k]
conf_header = 'from dsc.dsc_database import build_config_db, ResultDB\n'
conf_header = 'import os\nfrom dsc.dsc_database import build_config_db, ResultDB\n'
job_header = f"[global]\nimport os\n\nIO_DB = '{self.output}/{self.db}.conf.mpk'\n\n"\
f"{inspect.getsource(load_io_db)}"
processed_steps = dict()
Expand Down Expand Up @@ -154,11 +154,11 @@ def __init__(self,
'\n'.join(['\t' + x for x in conf_str_py.split('\n')])) + \
"\n[deploy_2 (Configuring output filenames)]\n"\
f"parameter: vanilla = {rerun}\n"\
f"input: '{DSC_CACHE}/{self.db}.io.mpk'\n"\
f"output: '{self.output}/{self.db}.map.mpk', "\
f"'{self.output}/{self.db}.conf.mpk'"\
"\nbuild_config_db(str(_input[0]), str(_output[0]), "\
f"str(_output[1]), vanilla = vanilla, jobs = {n_cpu})\n"\
f"if os.path.isfile('{self.output}/{self.db}.db'): os.remove('{self.output}/{self.db}.db')\n"\
"\n[build (Build meta-database)]\n"\
f"depends: '{DSC_CACHE}/{self.db}.io.mpk', '{self.output}/{self.db}.map.mpk'\n"\
f"output: '{self.output}/{self.db}.db'"\
Expand Down

0 comments on commit 8f01b9a

Please sign in to comment.