Przeglądaj źródła

Change default number of sql handlers in pool

ogert 5 lat temu
rodzic
commit
f31ee9b791

+ 1 - 1
cdplib/db_handlers/SQLHandler.py

@@ -23,7 +23,7 @@ class SQLHandlerPool(metaclass=SingletonThreadsafe):
     '''
     '''
 
-    def __init__(self, size: int = 1):
+    def __init__(self, size: int = 20):
         self._size = size
         self._log = Log(name='SQLHandlerPool')
         self._sql_handlers = [SQLHandler() for _ in range(size)]

+ 1 - 1
cdplib/unit_tests/TestMongodbHandler.py

@@ -81,7 +81,7 @@ class TestMongodbHandler(unittest.TestCase):
         Fetch data and confirms thats it is the same as was entered into the database
         Do the same with more specific query
         '''
-        self.assertEqual(self.mongodb_handler.query_data_and_generate_dataframe(self.first_collection_name).to_dict()['test_value_double'][0], self.valid_input['test_value_double'])
+        self.assertEqual(self.mongodb_handler.query_data_and_generate_dataframe(self.first_collection_name).to_dict()['test_value_double'][0], self.valid_input['test_value_double'])git 
         self.assertEqual(self.mongodb_handler.query_data_and_generate_dataframe(self.first_collection_name, 'test_value_string', 'test_value').to_dict()['test_value_double'][0], self.valid_input['test_value_double'])
     
     def test_F_aggregate_data_and_generate_dataframe(self):