def decode_task_payload(task):
 body = task['body']
 if (not body):
  return {}
 decoded = base64.b64decode(body)
 result = {}
 for (name, value) in cgi.parse_qs(decoded).items():
  if (len(value) == 1):
   result[name] = value[0]
  else:
   result[name] = value
 return util.HugeTask.decode_payload(result)

def decode_task_payload ( task ) : body = task [ 'body' ] if ( not body ) : return { } decoded = base64 . b64decode ( body ) result = { } for ( name , value ) in cgi . parse_qs ( decoded ) . items ( ) : if ( len ( value ) == 1 ) : result [ name ] = value [ 0 ] else : result [ name ] = value return util . HugeTask . decode_payload ( result )
decodes post task payload .