mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
Update video provider
This commit is contained in:
parent
aa92c2225e
commit
04b59558b4
5 changed files with 45 additions and 42 deletions
|
|
@ -94,6 +94,12 @@ async def lifespan(app: FastAPI):
|
|||
for browser in util.get_registered_instances():
|
||||
if browser.connection:
|
||||
browser.stop()
|
||||
lock_file = os.path.join(get_cookies_dir(), ".nodriver_is_open")
|
||||
if os.path.exists(lock_file):
|
||||
try:
|
||||
os.remove(lock_file)
|
||||
except Exception as e:
|
||||
debug.error(f"Failed to remove lock file {lock_file}:" ,e)
|
||||
|
||||
def create_app():
|
||||
app = FastAPI(lifespan=lifespan)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue