litellm / services /whisper /utils /storage.py
Ava2lon's picture
Upload 205 files
1425afc verified
Raw
History Blame Contribute Delete
299 Bytes
import os
import time
MAX_AGE = 60 * 60 # 1 hour
def cleanup(folder="jobs"):
now = time.time()
for f in os.listdir(folder):
path = os.path.join(folder, f)
if os.path.isfile(path):
if now - os.path.getmtime(path) > MAX_AGE:
os.remove(path)