m-ric HF Staff commited on
Commit
aaecdbc
·
1 Parent(s): af435c9

Add debugging logs

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -356,7 +356,15 @@ def cleanup_sandboxes():
356
 
357
  def get_or_create_sandbox(session_hash):
358
  current_time = time.time()
359
-
 
 
 
 
 
 
 
 
360
  # Check if sandbox exists and is still valid
361
  if (session_hash in SANDBOXES and
362
  session_hash in SANDBOX_METADATA and
 
356
 
357
  def get_or_create_sandbox(session_hash):
358
  current_time = time.time()
359
+ print("======")
360
+ print(":=======")
361
+ print("Session hash:", session_hash)
362
+ print("Sandboxes:", SANDBOXES.keys())
363
+ print("Session hash in SANDBOXES:", session_hash in SANDBOXES)
364
+ print("Session hash in SANDBOX_METADATA:", session_hash in SANDBOX_METADATA)
365
+ if session_hash in SANDBOX_METADATA:
366
+ print("Session not timeout:", current_time - SANDBOX_METADATA[session_hash]['created_at'] < SANDBOX_TIMEOUT)
367
+
368
  # Check if sandbox exists and is still valid
369
  if (session_hash in SANDBOXES and
370
  session_hash in SANDBOX_METADATA and