Skip to content

Commit

Permalink
Add Procfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mailgyc committed Jul 1, 2020
1 parent db4387a commit a567123
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: sh -c 'cd doudizhu && python3 app.py --password=your_database_password'
web: sh -c 'cd doudizhu && python3 app.py'
6 changes: 3 additions & 3 deletions doudizhu/contrib/db/aio_db.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import asyncio
import functools
import logging
from typing import Dict, Union
from typing import Dict, Optional, Union

import aiomysql
from aiomysql import Pool, DictCursor
Expand All @@ -22,7 +22,7 @@ def __init__(self, loop=None, **kwargs):
'autocommit': True,
}
self._loop = loop
self._conn_pool: Pool = None
self._conn_pool: Optional[Pool] = None
self._async_wait = None

@property
Expand Down Expand Up @@ -91,6 +91,6 @@ async def _execute(self, cursor: aiomysql.Cursor, query: str, args, kwargs):
try:
return await cursor.execute(query, kwargs or args)
except aiomysql.OperationalError:
logging.exception("Error connecting to MySQL on %s", self.host)
logging.exception("Error connecting to MySQL on %s", self._db_args['host'])
await self.close()
raise

0 comments on commit a567123

Please sign in to comment.