Skip to content

Commit b1c551f

Browse files
Update main.py
1 parent b3042ee commit b1c551f

File tree

1 file changed

+6
-6
lines changed
  • frameworks/Python/aiohttp/app

1 file changed

+6
-6
lines changed

frameworks/Python/aiohttp/app/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
if platform.python_implementation() != "PyPy":
2424
import asyncpg
2525

26+
class NoResetConnection(asyncpg.Connection):
27+
__slots__ = ()
28+
29+
def get_reset_query(self):
30+
return ""
31+
2632
CONNECTION_ORM = os.getenv('CONNECTION', 'ORM').upper() == 'ORM'
2733

2834

@@ -40,12 +46,6 @@ def pg_dsn(dialect=None) -> str:
4046
)
4147
return url.render_as_string(hide_password=False)
4248

43-
class NoResetConnection(asyncpg.Connection):
44-
__slots__ = ()
45-
46-
def get_reset_query(self):
47-
return ''
48-
4949
async def db_ctx(app: web.Application):
5050
# number of gunicorn workers = multiprocessing.cpu_count() as per gunicorn_conf.py
5151
# max_connections = 2000 as per toolset/setup/linux/databases/postgresql/postgresql.conf:64

0 commit comments

Comments
 (0)