From d8502bfcbfaf70d4a4232f7c9d5b32460c715950 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Thu, 5 Aug 2021 13:39:37 -0300 Subject: [PATCH] Updating constants --- setup.py | 2 +- src/provlake/__init__.py | 5 ----- src/provlake/utils/constants.py | 12 ++++++------ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 997f1dc..e18e65b 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup(name='provlake', - version='0.1.4', + version='0.1.5', description='A Python lib to capture multiworkflow provenance data from Python Scripts', url='http://ibm.biz/provlake', author='IBM Research', diff --git a/src/provlake/__init__.py b/src/provlake/__init__.py index 1b9af89..6c0f7d8 100644 --- a/src/provlake/__init__.py +++ b/src/provlake/__init__.py @@ -26,7 +26,6 @@ def _build_managed_persister( db_name: str, wf_exec_id=None ) -> ManagedPersister: - should_send_to_service = False if service_url is not None: should_send_to_service = True @@ -34,10 +33,6 @@ def _build_managed_persister( if not bag_size: bag_size = int(os.getenv("PROV_BAG_SIZE", 1)) - #self.last_task_id = 0 - #task_id = str(self.last_task_id) + "_" + str(id(self)) if self.cores > 1 else str(self.last_task_id) - #self.tasks = dict() - if not should_send_to_service: assert should_send_to_file is True, "If you are using ProvLake in offline mode, " \ "you need to log prov data to file. Check your 'should_send_to_file' and " \ diff --git a/src/provlake/utils/constants.py b/src/provlake/utils/constants.py index a846e0e..73e81da 100644 --- a/src/provlake/utils/constants.py +++ b/src/provlake/utils/constants.py @@ -111,24 +111,24 @@ def get_dte_id(wfe_id, dt_name: str, prov_task: dict): @staticmethod def get_wfe_ctx_id(wfe_id): - return wfe_id+"_ctx" + return wfe_id+"_wfe_ctx" @staticmethod def get_cce_ctx_id(cce_id): - return cce_id + "_ctx" + return cce_id + "_cce_ctx" @staticmethod def get_cci_ctx_id(cci_id): - return cci_id + "_ctx" + return cci_id + "_cci_ctx" @staticmethod def get_wfe_instantiations_ctx_id(wfe_id): - return wfe_id + "_instantiation" + return wfe_id + "_wfe_instantiation_ctx" @staticmethod def get_cce_instantiations_ctx_id(cce_id): - return cce_id + "_instantiation" + return cce_id + "_cce_instantiation_ctx" @staticmethod def get_cci_instantiations_ctx_id(cci_id): - return cci_id + "_instantiation" + return cci_id + "_cci_instantiation_ctx"