Spaces:
No application file
No application file
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import os
|
|
| 6 |
import time
|
| 7 |
import uuid
|
| 8 |
import pathlib
|
| 9 |
-
|
| 10 |
from io import BytesIO
|
| 11 |
from typing import Dict, List, Optional, Any
|
| 12 |
from contextlib import asynccontextmanager
|
|
@@ -180,7 +180,7 @@ async def health():
|
|
| 180 |
async def launch(request: BrowserLaunchRequest):
|
| 181 |
"""Launch a new browser instance"""
|
| 182 |
session_id = str(uuid.uuid4())
|
| 183 |
-
ts_dir = VIDEO_ROOT / f"{
|
| 184 |
ts_dir.mkdir(parents=True, exist_ok=True)
|
| 185 |
|
| 186 |
try:
|
|
|
|
| 6 |
import time
|
| 7 |
import uuid
|
| 8 |
import pathlib
|
| 9 |
+
import datetime as dt
|
| 10 |
from io import BytesIO
|
| 11 |
from typing import Dict, List, Optional, Any
|
| 12 |
from contextlib import asynccontextmanager
|
|
|
|
| 180 |
async def launch(request: BrowserLaunchRequest):
|
| 181 |
"""Launch a new browser instance"""
|
| 182 |
session_id = str(uuid.uuid4())
|
| 183 |
+
ts_dir = VIDEO_ROOT / f"{dt.datetime.utcnow():%Y%m%d_%H%M%S}_{session_id}"
|
| 184 |
ts_dir.mkdir(parents=True, exist_ok=True)
|
| 185 |
|
| 186 |
try:
|