Merge pull request #10424 from iridescentGray/develop

fix: remove contextmanager
This commit is contained in:
Matthias 2024-07-15 13:19:42 +02:00 committed by GitHub
commit beceacc3c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,3 @@
import contextlib
import threading
import time
@ -53,7 +52,6 @@ class UvicornServer(uvicorn.Server):
loop = asyncio.new_event_loop()
loop.run_until_complete(self.serve(sockets=sockets))
@contextlib.contextmanager
def run_in_thread(self):
self.thread = threading.Thread(target=self.run, name="FTUvicorn")
self.thread.start()