Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,10 @@ db_config = {
|
|
25 |
pool = PooledDB(pymysql, maxconnections=5, **db_config)
|
26 |
|
27 |
app = FastAPI()
|
|
|
28 |
|
29 |
def execute_query(sql, params=None, max_retries=3, retry_delay=1):
|
|
|
30 |
for attempt in range(max_retries):
|
31 |
try:
|
32 |
connection = pool.connection()
|
|
|
25 |
pool = PooledDB(pymysql, maxconnections=5, **db_config)
|
26 |
|
27 |
app = FastAPI()
|
28 |
+
LOG = logging.getLogger('uvicorn.error')
|
29 |
|
30 |
def execute_query(sql, params=None, max_retries=3, retry_delay=1):
|
31 |
+
LOG.debug("executing query " + sql + "with params" + str(params))
|
32 |
for attempt in range(max_retries):
|
33 |
try:
|
34 |
connection = pool.connection()
|