Skip to content

Commit 46ddf2f

Browse files
improve feedback for converting user objects
1 parent e7694d3 commit 46ddf2f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ide/modDBFunctions.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ def UpdateUsers(**kwargs):
1616
"""
1717

1818
count = 0
19+
modCount = 0
1920
for c in kwargs['User'].query():
21+
count += 1
22+
if (count % 100) == 0:
23+
print("Checking user: ", c.key.id(), " count = ", count)
24+
2025
if not c.email:
2126
if c.gaeUser:
27+
modCount += 1
2228
c.email = c.gaeUser.email()
2329
c.put()
24-
print("Updated user: ", c.key.id(), ":", c.email, " count = ", count)
25-
count += 1
30+
if (modCount % 100) == 0:
31+
print("Modified 100 more users: ", c.key.id(), " modCount = ", modCount, "email=", c.email)
2632

2733

2834
def DumpSettings(**kwargs):

0 commit comments

Comments
 (0)