Skip to content

Commit 370a0e3

Browse files
committed
Added a progress bar to the submission checker json field upgrade migration.
- Legacy-Id: 14276
1 parent 6edcd1b commit 370a0e3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ietf/submit/migrations/0022_submission_check_json_upgrade.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Generated by Django 1.10.8 on 2017-10-27 06:34
33
from __future__ import unicode_literals
44

5+
from tqdm import tqdm
6+
57
from django.db import migrations
68

79
# convert the SubmissionCheck.items to consistently be a dict, with the
@@ -13,11 +15,11 @@
1315
# 'draft': <draftname>;
1416
# 'modules': { <extracted module info> },
1517
# }
16-
18+
tqdm.monitor_interval = 0 # workaround for spurious error in tqdm's monitoring thread
1719

1820
def forwards(apps, schema_editor):
1921
SubmissionCheck = apps.get_model('submit', 'SubmissionCheck')
20-
for check in SubmissionCheck.objects.all().order_by('id'):
22+
for check in tqdm(SubmissionCheck.objects.all()):
2123
# deal with these cases:
2224
# * empty dictionary
2325
# * empty list

0 commit comments

Comments
 (0)