fix: anonymous id as env var (#1106)
<!-- .github/pull_request_template.md --> ## Description <!-- Provide a clear description of the changes in this PR --> ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.
This commit is contained in:
parent
01bab3f0c7
commit
43a21342a3
1 changed files with 5 additions and 0 deletions
|
|
@ -54,6 +54,11 @@ def extract_pos_tags(sentence):
|
|||
|
||||
def get_anonymous_id():
|
||||
"""Creates or reads a anonymous user id"""
|
||||
tracking_id = os.getenv("TRACKING_ID", None)
|
||||
|
||||
if tracking_id:
|
||||
return tracking_id
|
||||
|
||||
home_dir = str(pathlib.Path(pathlib.Path(__file__).parent.parent.parent.resolve()))
|
||||
|
||||
if not os.path.isdir(home_dir):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue