Skip to content

Commit

Permalink
Bugfixes on closing cycle capture
Browse files Browse the repository at this point in the history
  • Loading branch information
Renan Souza committed Jul 9, 2020
1 parent 10ce2a4 commit 87b92a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


setup(name='provlake',
version='0.0.71',
version='0.0.72',
description='A Python lib to capture multiworkflow provenance data from Python Scripts',
url='http://ibm.biz/provlake',
author='IBM Research',
Expand Down
3 changes: 2 additions & 1 deletion src/provlake/prov_lake.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def __init__(self,
if should_log_to_file:
if not os.path.exists(log_dir):
os.makedirs(os.path.join(os.getcwd(),log_dir))
offline_prov_log_path = os.path.join(log_dir, 'prov-{}.log'.format(self.wf_execution))
self.filename = 'prov-{}.log'.format(self.wf_execution)
offline_prov_log_path = os.path.join(log_dir, self.filename)
handler = logging.FileHandler(offline_prov_log_path, mode='a+', delay=False)
offline_prov_log = logging.getLogger("OFFLINE_PROV")
offline_prov_log.setLevel("DEBUG")
Expand Down
4 changes: 3 additions & 1 deletion src/provlake/stateless/cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, workflow_name: str, wfexec_id: str, cycle_name: str,
:param input_args:
:param log_dir:
"""
self.prov_obj = None
self.prov_obj = {}
self.iteration_id = iteration_id
self.cycle_name = cycle_name
self.input_args = input_args
Expand Down Expand Up @@ -60,6 +60,8 @@ def _capture_output(self, values: dict, stdout: str = None, stderr: str = None):

self.prov_obj["endTime"] = time()
self.prov_obj["status"] = "FINISHED"
self.prov_obj["iteration_id"] = self.iteration_id
self.prov_obj["wf_execution"] = self.wfexec_id

if stdout:
self.prov_obj["stdout"] = stdout
Expand Down

0 comments on commit 87b92a1

Please sign in to comment.