Skip to content

Commit

Permalink
DCV-1764 support dbt 1.6 (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
BAntonellini authored Aug 10, 2023
1 parent b81dcef commit 25a13e3
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 240 deletions.
4 changes: 1 addition & 3 deletions dbt_coves/utils/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ def _get_mixpanel_env_token():
return MIXPANEL_DEV_TOKEN if is_dev else MIXPANEL_PROD_TOKEN


mixpanel = Mixpanel(token=_get_mixpanel_env_token())


def trackable(task, **kwargs):
def wrapper(task_instance, **kwargs):
exit_code = task(task_instance)
if not task_instance.args.disable_tracking:
task_execution_props = _gen_task_usage_props(task_instance, exit_code)
mixpanel = Mixpanel(token=_get_mixpanel_env_token())
mixpanel.track(
distinct_id=task_instance.args.uuid,
event_name=f"{task_execution_props['dbt-coves command']}\
Expand Down
Loading

0 comments on commit 25a13e3

Please sign in to comment.