remove wrint, actually loop over all items
This commit is contained in:
parent
f8f500e8c6
commit
ec0a33bfdb
2 changed files with 3 additions and 3 deletions
|
|
@ -30,8 +30,9 @@ class Command(BaseCommand):
|
|||
chunk = options['all'] and 100 or options['items']
|
||||
qs = models.Item.objects.exclude(itemId__startswith='0x')
|
||||
count = pos = qs.count()
|
||||
while options['all'] and offset <= count or offset < options['items']:
|
||||
for i in qs.order_by('modified')[offset:offset+chunk]:
|
||||
while (options['all'] and offset <= count) or offset < options['items']:
|
||||
print offset, pos, count
|
||||
for i in qs.order_by('modified')[:chunk]:
|
||||
print pos, i.itemId, i.modified
|
||||
i.update_external()
|
||||
pos -= 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue