Skip to content

Commit

Permalink
Use keyword arguments in tracker initialization for compatibility
Browse files Browse the repository at this point in the history
Using a kwarg should make this compatible: snowplow/snowplow-python-tracker@f2c6b36
  • Loading branch information
edgarrmondragon committed Feb 27, 2024
1 parent 1e158ae commit 277b3c9
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions core/dbt/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pytz
import requests
from snowplow_tracker import Emitter, SelfDescribingJson, Subject, Tracker
from snowplow_tracker import __version__ as snowplow_version # type: ignore
from snowplow_tracker import __version__ as snowplow_version # type: ignore
from snowplow_tracker import logger as sp_logger

from dbt import version as dbt_version
Expand Down Expand Up @@ -107,20 +107,11 @@ def http_get(self, payload):


emitter = TimeoutEmitter()

# workaround in case real snowplow tracker is in the env
if snowplow_version == "0.0.2":
tracker = Tracker(
emitter,
namespace="cf",
app_id="dbt",
)
else:
tracker = Tracker(
"cf",
emitters=emitter,
app_id="dbt",
) # type: ignore
tracker = Tracker(
emitters=emitter,
namespace="cf",
app_id="dbt",
)


class User:
Expand Down

0 comments on commit 277b3c9

Please sign in to comment.