Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Amey Tendulkar committed Nov 10, 2023
1 parent a409647 commit d04d769
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions api/dbrouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __init__(self):

def db_for_read(self, model, **hints):
"""
Reads go to a randomly-chosen replica.
Round-Robin
"""
db_to = self.replica_dbs[self.next_replica]
self.next_replica = (self.next_replica + 1) % 2
Expand All @@ -33,7 +33,4 @@ def allow_relation(self, obj1, obj2, **hints):
return None

def allow_migrate(self, db, app_label, model_name=None, **hints):
"""
All non-auth models end up in this pool.
"""
return True

0 comments on commit d04d769

Please sign in to comment.