Skip to content

Commit

Permalink
incremented logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mlodic committed Sep 19, 2022
1 parent 4674a63 commit 8e7c2ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions djongo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,13 @@ def get_new_connection(self, connection_params):
return self.client_connection[name]

def connect(self):
logger.debug(f"CONN_MAX_AGE: {self.settings_dict['CONN_MAX_AGE']}")
if self.client_connection:
logger.debug("not creating a new connection because it already exists")
else:
logger.debug("creating a new connection")
super().connect()
logger.debug(f"after connect: close at {self.close_at}")

def _set_autocommit(self, autocommit):
"""
Expand Down

0 comments on commit 8e7c2ba

Please sign in to comment.