9717cceb by 冯轩

MOD:max_conn_age,remove queue empty log

1 parent d4c1a428
...@@ -1646,7 +1646,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -1646,7 +1646,7 @@ class Command(BaseCommand, LoggerMixin):
1646 try: 1646 try:
1647 channel, img_path, text_list = img_queue.get(block=False) 1647 channel, img_path, text_list = img_queue.get(block=False)
1648 except Exception as e: 1648 except Exception as e:
1649 self.online_log.info('{0} [img_2_ocr_1] [queue empty]'.format(self.log_base)) 1649 # self.online_log.info('{0} [img_2_ocr_1] [queue empty]'.format(self.log_base))
1650 time.sleep(self.sleep_time_img_get) 1650 time.sleep(self.sleep_time_img_get)
1651 continue 1651 continue
1652 else: 1652 else:
......
...@@ -102,7 +102,7 @@ for db_setting in DATABASES.values(): ...@@ -102,7 +102,7 @@ for db_setting in DATABASES.values():
102 'driver': 'ODBC Driver 17 for SQL Server', 102 'driver': 'ODBC Driver 17 for SQL Server',
103 'extra_params': "odbc_cursortype=2" 103 'extra_params': "odbc_cursortype=2"
104 } 104 }
105 db_setting['CONN_MAX_AGE'] = 60 105 db_setting['CONN_MAX_AGE'] = 0
106 # set this to False if you want to turn off pyodbc's connection pooling 106 # set this to False if you want to turn off pyodbc's connection pooling
107 DATABASE_CONNECTION_POOLING = True 107 DATABASE_CONNECTION_POOLING = True
108 108
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!