Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramshackle-Jamathon committed Sep 19, 2023
1 parent 1e416b8 commit 3e7a7e9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions purina_usage/utils/dagster_insights.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

from dagster import OpExecutionContext

URL = "http://127.0.0.1:3000/test/staging/graphql/"
URL = "https://dagster-insights.dogfood.dagster.cloud/prod/graphql/"
CLOUD_TOKEN = os.getenv("DAGSTER_CLOUD_API_TOKEN")

PUT_CLOUD_METRICS_MUTATION = """
mutation CreateOrUpdateExtenalMetrics(
Expand Down Expand Up @@ -150,7 +151,10 @@ def store_dbt_adapter_metrics(

variables = {"metrics": metric_graphql_input}
response = requests.post(
URL, json={"query": PUT_CLOUD_METRICS_MUTATION, "variables": variables}, timeout=300
URL,
json={"query": PUT_CLOUD_METRICS_MUTATION, "variables": variables},
timeout=300,
headers={"Dagster-Cloud-Api-Token": CLOUD_TOKEN},
)
response.raise_for_status()
json = response.json()
Expand Down

0 comments on commit 3e7a7e9

Please sign in to comment.