forked from 0x2620/pandora
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:
|
||||
response['data']['user'] = response['data']['site']['user']
|
||||
response['data']['user']['ui'] = get_ui(json.loads(request.session.get('ui', '{}')))
|
||||
print request.session, request.session.keys()
|
||||
return render_to_json_response(response)
|
||||
actions.register(init)
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue