Skip to content

Commit

Permalink
chore: improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulFarault committed Feb 20, 2024
1 parent 7914ccf commit 1a20184
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tdp/core/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,12 @@ def _init_operations(
),
depends_on=read_operation.depends_on.copy(),
)
# If the operation is already listed, merge its dependencies
# If the operation is already registered, merge its dependencies
if existing_operation:
dag_operation_to_register.depends_on.extend(
dag_operations[read_operation.name].depends_on
)
# Print a warning if we override a playbook operation
if not existing_operation.noop:
logger.debug(
f"'{read_operation.name}' defined in "
Expand All @@ -176,7 +177,7 @@ def _init_operations(
dag_operations[read_operation.name] = dag_operation_to_register
continue

# The read_operation is already listed
# The read_operation is already registered
if existing_operation:
logger.debug(
f"'{read_operation.name}' defined in "
Expand All @@ -189,7 +190,7 @@ def _init_operations(
# From this point, the read_operation is a noop as it is not defined
# in the current nor the previous collections

# Create and store the operation
# Create and register the operation
dag_operations[read_operation.name] = Operation(
name=read_operation.name,
collection_name=collection.name,
Expand All @@ -204,7 +205,7 @@ def _init_operations(
f"'{read_operation.name}' is noop, creating the associated "
"restart and stop operations"
)
# Create and store the restart operation
# Create and register the restart operation
restart_operation_name = read_operation.name.replace(
"_start", "_restart"
)
Expand All @@ -215,7 +216,7 @@ def _init_operations(
noop=True,
host_names=None,
)
# Create and store the stop operation
# Create and register the stop operation
stop_operation_name = read_operation.name.replace(
"_start", "_stop"
)
Expand Down

0 comments on commit 1a20184

Please sign in to comment.