New executor.
This commit is contained in:
parent
c8461342fd
commit
0bc24e8d2e
@ -38,7 +38,7 @@ from snek.view.search_user import SearchUserView
|
||||
from snek.view.avatar import AvatarView
|
||||
from snek.system.profiler import profiler_handler
|
||||
from snek.view.terminal import TerminalView, TerminalSocketView
|
||||
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
SESSION_KEY = b"c79a0c5fda4b424189c427d28c9f7c34"
|
||||
|
||||
|
||||
@ -170,7 +170,10 @@ class Application(BaseApplication):
|
||||
|
||||
return await super().render_template(template, request, context)
|
||||
|
||||
executor = ThreadPoolExecutor(max_workers=100)
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.set_default_executor(executor)
|
||||
|
||||
app = Application(db_path="sqlite:///snek.db")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user