mirror of https://github.com/zulip/zulip.git
populate_db: Close database connections before shutting down.
This avoids some messages being logged by the postgres server. (imported from commit 86aaa025a36dad6ec14d49b629cfb1ec326f929c)
This commit is contained in:
parent
e330be7fc1
commit
434765d810
|
@ -223,6 +223,7 @@ class Command(BaseCommand):
|
|||
self.stdout.write("Successfully populated test database.\n")
|
||||
if options["replay_old_messages"]:
|
||||
restore_saved_messages()
|
||||
connection.close()
|
||||
|
||||
recipient_hash = {}
|
||||
def get_recipient_by_id(rid):
|
||||
|
@ -730,4 +731,5 @@ def send_messages(data):
|
|||
|
||||
recipients[num_messages] = [message_type, message.recipient.id, saved_data]
|
||||
num_messages += 1
|
||||
connection.close()
|
||||
return tot_messages
|
||||
|
|
Loading…
Reference in New Issue