mirror of https://github.com/zulip/zulip.git
Seed the populate_db random number generator.
This makes it not to produce 10 copies of each message. (imported from commit 35ab5f14ec104b4ea52137dac4fa2840194f3777)
This commit is contained in:
parent
f26a614bb3
commit
a695732bda
|
@ -19,6 +19,7 @@ import simplejson
|
|||
import datetime
|
||||
import random
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
import hashlib
|
||||
import base64
|
||||
|
@ -509,6 +510,7 @@ def restore_saved_messages():
|
|||
# - both single and multi-line content
|
||||
def send_messages(data):
|
||||
(tot_messages, personals_pairs, options, output) = data
|
||||
random.seed(os.getpid())
|
||||
from django.db import connection
|
||||
connection.close()
|
||||
texts = file("zephyr/management/commands/test_messages.txt", "r").readlines()
|
||||
|
|
Loading…
Reference in New Issue