mirror of https://github.com/zulip/zulip.git
populate_analytics_db: Replace intermediate list with generator.
Followup to commit ab120a03bc
(#16265).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
d9860d40a6
commit
b84260014a
|
@ -99,10 +99,10 @@ class Command(BaseCommand):
|
||||||
id_args = {'stream': stream, 'realm': realm}
|
id_args = {'stream': stream, 'realm': realm}
|
||||||
|
|
||||||
for subgroup, values in fixture_data.items():
|
for subgroup, values in fixture_data.items():
|
||||||
table.objects.bulk_create([
|
table.objects.bulk_create(
|
||||||
table(property=stat.property, subgroup=subgroup, end_time=end_time,
|
table(property=stat.property, subgroup=subgroup, end_time=end_time,
|
||||||
value=value, **id_args)
|
value=value, **id_args)
|
||||||
for end_time, value in zip(end_times, values) if value != 0])
|
for end_time, value in zip(end_times, values) if value != 0)
|
||||||
|
|
||||||
stat = COUNT_STATS['1day_actives::day']
|
stat = COUNT_STATS['1day_actives::day']
|
||||||
realm_data: Mapping[Optional[str], List[int]] = {
|
realm_data: Mapping[Optional[str], List[int]] = {
|
||||||
|
|
Loading…
Reference in New Issue