Skip to content

Commit

Permalink
Clarify why we create a db per hub
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed May 18, 2021
1 parent adb6c83 commit dbe77b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions deployer/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ def ensure_client(self, name, domains, connection_name):
current_connections = self.get_connections()

if connection_name == 'password':
# All hubs attached to a single database 'connection'
# will share username / password. So we create one
# connection per hub.
# Users should not be shared between hubs - each hub
# should have its own username / password database.
# So we create a new 'database connection' per hub,
# instead of sharing one across hubs.
db_connection_name = f'database-{name}'

if db_connection_name not in current_connections:
Expand Down

0 comments on commit dbe77b8

Please sign in to comment.