Skip to content

Commit

Permalink
remove env variable 'PARSL_TRACKING' from usage tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
NishchayKarle committed Jun 3, 2024
1 parent 4934c30 commit a888788
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions parsl/usage_tracking/usage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
import logging
import os
import platform
import socket
import sys
Expand Down Expand Up @@ -60,6 +59,7 @@ def udp_messenger(domain_name: str, UDP_PORT: int, sock_timeout: int, message: b
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
sock.settimeout(sock_timeout)
sock.sendto(message, (UDP_IP, UDP_PORT))
print(message)
sock.close()

except socket.timeout:
Expand Down Expand Up @@ -117,21 +117,16 @@ def __init__(self, dfk, port=50077,
def check_tracking_enabled(self):
"""Check if tracking is enabled.
Tracking will be enabled unless either of these is true:
Tracking will be enabled unless the following is true:
1. dfk.config.usage_tracking is set to False
2. Environment variable PARSL_TRACKING is set to false (case insensitive)
"""
track = True

if not self.config.usage_tracking:
track = False

envvar = str(os.environ.get("PARSL_TRACKING", True)).lower()
if envvar == "false":
track = False

return track

def construct_start_message(self) -> bytes:
Expand Down

0 comments on commit a888788

Please sign in to comment.