diff --git a/cdip_connector/core/cdip_settings.py b/cdip_connector/core/cdip_settings.py index abede33..e713a7e 100644 --- a/cdip_connector/core/cdip_settings.py +++ b/cdip_connector/core/cdip_settings.py @@ -68,14 +68,14 @@ JOB_COMPLETION_COUNT = int(_job_completion_count) if _job_completion_count is not None else None # Sanitize task count and index. -if JOB_COMPLETION_INDEX is not None \ - and JOB_COMPLETION_COUNT is not None: - if JOB_COMPLETION_COUNT > 1 and JOB_COMPLETION_COUNT > JOB_COMPLETION_INDEX: - # Partitioned - JOB_IS_PARTITIONED = True - else: +if all(item is not None for item in [JOB_COMPLETION_INDEX, JOB_COMPLETION_COUNT]): + + if JOB_COMPLETION_INDEX >= JOB_COMPLETION_COUNT: # Values are set but are not valid. raise ValueError('JOB_COMPLETION_COUNT must be greater than 1 and greater than JOB_COMPLETION_INDEX') + else: + JOB_IS_PARTITIONED = True + else: # No partitioning JOB_IS_PARTITIONED = False diff --git a/pyproject.toml b/pyproject.toml index efb2d17..bc5e26a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cdip_connector" -version = "1.5.3" +version = "1.5.4" description = "SMART Integrate Connector Library" authors = [ "Rohit Chaudhri ",