@task
@use_master
def update_supported_locales(ids, **kw):
 for chunk in chunked(ids, 50):
  for app in Webapp.objects.filter(id__in=chunk):
   try:
    if app.update_supported_locales():
     _log(app, u'Updated supported locales')
   except Exception:
    _log(app, u'Updating supported locales failed.', exc_info=True)

@ task @ use_master def update_supported_locales ( ids , ** kw ) : for chunk in chunked ( ids , 50 ) : for app in Webapp . objects . filter ( id__in = chunk ) : try : if app . update_supported_locales ( ) : _log ( app , u'Updated supported locales' ) except Exception : _log ( app , u'Updating supported locales failed.' , exc_info = True )
task intended to run via command line to update all apps supported locales based on the current version .