Skip to content

Commit

Permalink
Address PR review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Oct 13, 2021
1 parent 5887383 commit 548583f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
10 changes: 5 additions & 5 deletions cylc/flow/flow_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@

"""Manage flow counter and flow metadata."""

from typing import Dict, Set, TYPE_CHECKING
from typing import Dict, Set
import datetime

from cylc.flow import LOG

if TYPE_CHECKING:
from cylc.flow.workflow_db_mgr import WorkflowDatabaseManager
from cylc.flow.workflow_db_mgr import WorkflowDatabaseManager


class FlowMgr:
Expand Down Expand Up @@ -54,7 +52,9 @@ def get_new_flow(self, description: str = "no description") -> int:
self.counter,
self.flows[self.counter]
)
self.db_mgr.put_workflow_params_1("flow_counter", self.counter)
self.db_mgr.put_workflow_params_1(
WorkflowDatabaseManager.KEY_FLOW_COUNTER,
self.counter)
return self.counter

def load_flows_db(self, flow_nums: Set[int]) -> None:
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ def command_poll_tasks(self, items=None):
[
itask
for itask in itasks
if itask.state(*TASK_STATUSES_ACTIVE, TASK_STATUS_FAILED)
if itask.state(*TASK_STATUSES_ACTIVE)
]
)
return len(bad_items)
Expand Down
3 changes: 1 addition & 2 deletions cylc/flow/scripts/set_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

"""cylc set-outputs [OPTIONS] ARGS
Tell the scheduler that specified (or "succeeded", by default) outputs
of tasks are complete.
Set specified task outputs ("succeeded" by default) to complete.
Downstream tasks will be spawned or updated just as if the outputs were
completed normally.
Expand Down
3 changes: 1 addition & 2 deletions cylc/flow/task_job_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,7 @@ def _manip_task_jobs_callback(
# Note this catches KeyError too.
LOG.warning(
'Unhandled %s output: %s', ctx.cmd_key, line)
# TODO - this looks like an uncaught error, in the log:
LOG.exception(exc)
LOG.warning(str(exc))
# Task jobs that are in the original command but did not get a status
# in the output. Handle as failures.
for key, itask in sorted(bad_tasks.items()):
Expand Down

0 comments on commit 548583f

Please sign in to comment.