@shared_task(bind=True, base=DebugBasketTask, default_retry_delay=BASKET_TASK_RETRY_DELAY, max_retries=BASKET_TASK_MAX_RETRIES)
def lookup_user_task(self, email):
 result = {}
 try:
  result = basket.lookup_user(email=email)
 except MaxRetriesExceededError as exc:
  raise exc
 except basket.BasketException as exc:
  if (not (exc[0] == u'User not found')):
   raise self.retry(exc=exc)
  result = exc.result
 return result

@ shared_task ( bind = True , base = DebugBasketTask , default_retry_delay = BASKET_TASK_RETRY_DELAY , max_retries = BASKET_TASK_MAX_RETRIES ) def lookup_user_task ( self , email ) : result = { } try : result = basket . lookup_user ( email = email ) except MaxRetriesExceededError as exc : raise exc except basket . BasketException as exc : if ( not ( exc [ 0 ] == u'User not found' ) ) : raise self . retry ( exc = exc ) result = exc . result return result
task responsible for getting information about a user in basket .