Skip to content

Commit

Permalink
use dagster._core.storage.tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mlarose committed Oct 7, 2024
1 parent c032815 commit 3807049
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python_modules/dagster/dagster/_cli/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
get_python_environment_entry_point,
)
from dagster._core.storage.dagster_run import DagsterRun, DagsterRunStatus
from dagster._core.storage.tags import RUN_METRIC_TAGS
from dagster._core.types.loadable_target_origin import LoadableTargetOrigin
from dagster._core.utils import FuturesAwareThreadPoolExecutor
from dagster._grpc import DagsterGrpcClient, DagsterGrpcServer
Expand Down Expand Up @@ -87,9 +88,7 @@ def send_to_buffer(event):


def _should_start_metrics_thread(dagster_run: DagsterRun) -> bool:
return get_boolean_tag_value(
dagster_run.tags.get("dagster/run_metrics")
) or get_boolean_tag_value(dagster_run.tags.get(".dagster/run_metrics"))
return any(get_boolean_tag_value(dagster_run.tags.get(tag)) for tag in RUN_METRIC_TAGS)


def _enable_python_runtime_metrics(dagster_run: DagsterRun) -> bool:
Expand Down

0 comments on commit 3807049

Please sign in to comment.