mirror of https://github.com/zulip/zulip.git
populate_db: Add --extra-bots option to create extra bots.
This commit is contained in:
parent
b867ac3496
commit
7e8d3d9a46
|
@ -52,6 +52,12 @@ class Command(BaseCommand):
|
|||
default=0,
|
||||
help='The number of extra users to create')
|
||||
|
||||
parser.add_argument('--extra-bots',
|
||||
dest='extra_bots',
|
||||
type=int,
|
||||
default=0,
|
||||
help='The number of extra bots to create')
|
||||
|
||||
parser.add_argument('--huddles',
|
||||
dest='num_huddles',
|
||||
type=int,
|
||||
|
@ -234,6 +240,8 @@ class Command(BaseCommand):
|
|||
("Zulip Error Bot", "error-bot@zulip.com"),
|
||||
("Zulip Default Bot", "default-bot@zulip.com"),
|
||||
]
|
||||
for i in range(options["extra_bots"]):
|
||||
zulip_realm_bots.append(('Extra Bot %d' % (i,), 'extrabot%d@zulip.com' % (i,)))
|
||||
zulip_realm_bots.extend(all_realm_bots)
|
||||
create_users(zulip_realm, zulip_realm_bots, bot_type=UserProfile.DEFAULT_BOT)
|
||||
|
||||
|
|
Loading…
Reference in New Issue