Skip to content

Commit

Permalink
Merge pull request #224 from jameshcorbett/fix-datamovement-limit
Browse files Browse the repository at this point in the history
dws: fix datamovement limit call
  • Loading branch information
mergify[bot] authored Oct 1, 2024
2 parents 8ca72d0 + eb45d94 commit 223db79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/coral2_dws.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,21 +194,21 @@ def get_datamovements(k8s_api, workflow_name, count):
Return 'count' datamovements.
"""
if LOGGER.isEnabledFor(logging.INFO):
limit = None
limit_arg = {}
else:
if count <= 0:
return []
limit = count
limit_arg = {"limit": count}
try:
api_response = k8s_api.list_cluster_custom_object(
group="nnf.cray.hpe.com",
version="v1alpha2",
plural="nnfdatamovements",
limit=limit,
label_selector=(
f"dataworkflowservices.github.io/workflow.name={workflow_name},"
"dataworkflowservices.github.io/workflow.namespace=default"
),
**limit_arg,
)
except Exception as exc:
LOGGER.warning(
Expand Down

0 comments on commit 223db79

Please sign in to comment.