@task
@use_master
@set_modified_on
def resize_promo_imgs(src, dst, sizes, **kw):
 log.info(('[1@None] Resizing promo imgs: %s' % dst))
 try:
  for s in sizes:
   size_dst = ('%s-%s.png' % (dst, s))
   resize_image(src, size_dst, (s, 0), remove_src=False)
   pngcrush_image.delay(size_dst, **kw)
  with private_storage.open(src) as fd:
   promo_img_hash = _hash_file(fd)
  private_storage.delete(src)
  log.info(('Promo img hash resizing completed for: %s' % dst))
  return {'promo_img_hash': promo_img_hash}
 except Exception as e:
  log.error(('Error resizing promo img hash: %s; %s' % (e, dst)))

@ task @ use_master @ set_modified_on def resize_promo_imgs ( src , dst , sizes , ** kw ) : log . info ( ( '[1@None] Resizing promo imgs: %s' % dst ) ) try : for s in sizes : size_dst = ( '%s-%s.png' % ( dst , s ) ) resize_image ( src , size_dst , ( s , 0 ) , remove_src = False ) pngcrush_image . delay ( size_dst , ** kw ) with private_storage . open ( src ) as fd : promo_img_hash = _hash_file ( fd ) private_storage . delete ( src ) log . info ( ( 'Promo img hash resizing completed for: %s' % dst ) ) return { 'promo_img_hash' : promo_img_hash } except Exception as e : log . error ( ( 'Error resizing promo img hash: %s; %s' % ( e , dst ) ) )
resizes webapp/website promo imgs .