Added created_at to session metadata

This commit is contained in:
Lyncoln
2026-10-27 08:31:37 -04:00
parent 90135afce7
commit 924b49c6b5
+3 -1
View File
@@ -1,6 +1,7 @@
import requests
import threading
import os
import time
from .request import buildRequest
#session = requests.Session()
@@ -15,6 +16,7 @@ def getSession(reset=False):
if not hasattr(_thread_local, "session"):
session = requests.Session()
session.name = threading.current_thread().name
session.created_at = time.monotonic()
_thread_local.session = session
return _thread_local.session
@@ -23,7 +25,7 @@ def getSession(reset=False):
def executeRequest(action, outputs, resolved):
session = getSession()
session_log = bool(os.environ.get("LOGS_SESSION", False))
session_log = os.environ.get("LOGS_SESSION", "false").lower() == "true"
if session_log:
print(