Only select exists without audit_period's for migration
This commit is contained in:
parent
54a16b67a2
commit
0f11d39802
@ -58,8 +58,9 @@ def add_past_usage(raws):
|
|||||||
if processed % 50 == 0:
|
if processed % 50 == 0:
|
||||||
next_update = last_update + datetime.timedelta(seconds=30)
|
next_update = last_update + datetime.timedelta(seconds=30)
|
||||||
if datetime.datetime.utcnow() > next_update:
|
if datetime.datetime.utcnow() > next_update:
|
||||||
(processed, count - processed, float(processed) / count)
|
values = (processed, count - processed,
|
||||||
print "%s processed, %s to go, %.2f percent done"
|
(float(processed) / count) * 100)
|
||||||
|
print "%s processed, %s to go, %.2f percent done" % values
|
||||||
print "completed processing %s events" % count
|
print "completed processing %s events" % count
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,8 +27,11 @@ def print_update(total, completed, errored):
|
|||||||
to_go = total - (completed + errored)
|
to_go = total - (completed + errored)
|
||||||
print "%s populated, %s to go, %s errored" % (completed, to_go, errored)
|
print "%s populated, %s to go, %s errored" % (completed, to_go, errored)
|
||||||
|
|
||||||
|
filters = {
|
||||||
exists = models.InstanceExists.objects.all()
|
'audit_period_beginning__exact': None,
|
||||||
|
'audit_period_ending__exact': None
|
||||||
|
}
|
||||||
|
exists = models.InstanceExists.objects.filter(**filters)
|
||||||
|
|
||||||
count = exists.count()
|
count = exists.count()
|
||||||
start = datetime.datetime.utcnow()
|
start = datetime.datetime.utcnow()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user