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
|
@ -74,7 +74,6 @@ def init(request):
|
||||||
else:
|
else:
|
||||||
response['data']['user'] = response['data']['site']['user']
|
response['data']['user'] = response['data']['site']['user']
|
||||||
response['data']['user']['ui'] = get_ui(json.loads(request.session.get('ui', '{}')))
|
response['data']['user']['ui'] = get_ui(json.loads(request.session.get('ui', '{}')))
|
||||||
print request.session, request.session.keys()
|
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
actions.register(init)
|
actions.register(init)
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,9 @@ class Command(BaseCommand):
|
||||||
chunk = options['all'] and 100 or options['items']
|
chunk = options['all'] and 100 or options['items']
|
||||||
qs = models.Item.objects.exclude(itemId__startswith='0x')
|
qs = models.Item.objects.exclude(itemId__startswith='0x')
|
||||||
count = pos = qs.count()
|
count = pos = qs.count()
|
||||||
while options['all'] and offset <= count or offset < options['items']:
|
while (options['all'] and offset <= count) or offset < options['items']:
|
||||||
for i in qs.order_by('modified')[offset:offset+chunk]:
|
print offset, pos, count
|
||||||
|
for i in qs.order_by('modified')[:chunk]:
|
||||||
print pos, i.itemId, i.modified
|
print pos, i.itemId, i.modified
|
||||||
i.update_external()
|
i.update_external()
|
||||||
pos -= 1
|
pos -= 1
|
||||||
|
|
Loading…
Reference in a new issue