Skip to content

Commit 22ec567

Browse files
authored
Merge pull request #827 from superannotateai/FRIDAY-4703
Add mixpanel env field
2 parents 6d6e897 + 095f11f commit 22ec567

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/superannotate/lib/app/interface/base_interface.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import platform
55
import sys
66
import typing
7+
from functools import lru_cache
78
from inspect import signature
89
from pathlib import Path
910
from types import FunctionType
@@ -128,6 +129,7 @@ def get_mp_instance(self) -> Mixpanel:
128129
return Mixpanel(mp_token)
129130

130131
@staticmethod
132+
@lru_cache
131133
def get_default_payload(team_name, user_email):
132134
return {
133135
"SDK": True,
@@ -136,6 +138,7 @@ def get_default_payload(team_name, user_email):
136138
"Version": os.environ["sa_version"],
137139
"Python version": platform.python_version(),
138140
"Python interpreter type": platform.python_implementation(),
141+
"Env": os.environ.get("SA_ENV", "N/A"),
139142
}
140143

141144
def __init__(self, function):

0 commit comments

Comments
 (0)