예제 #1
0
    def submitOrder(self, order, auth):
        if is_valid_request(auth):
            # persist the new order
            processor = OrderProcessor()
            new_order = processor.create_order(order.name, order.address)

            # create thread and process order
            thread.start_new_thread(processor.process_order, (order.tracks,))

            # return the order unique id
            logger.info("Backoffice: Returning async request for submit order")
            return new_order.id
예제 #2
0
    def submitOrder(self, order, auth):
        if is_valid_request(auth):
            #persist the new order
            processor = OrderProcessor()
            new_order = processor.create_order(order.name, order.address)

            #create thread and process order
            thread.start_new_thread(
                processor.process_order,
                (order.tracks, ),
            )

            #return the order unique id
            logger.info("Backoffice: Returning async request for submit order")
            return new_order.id
예제 #3
0
 def setStatusOrder(self, order, status, auth):
     if is_valid_request(auth):
         Notificator(order).notificate_frontend(status)
         return "OK"
예제 #4
0
 def getBudgetResponse(self, order, price, auth):
     if is_valid_request(auth):
         create_budget(auth.user_id, order, price)
         verify_and_finalize_order(order)
예제 #5
0
 def getTracks(self, artist_name, auth):
     if is_valid_request(auth):
         response = LastFMClient().getArtistTracks(unquote(artist_name))
         logger.info("Backoffice: Returning request for tracks search")
         return response
예제 #6
0
 def setStatusOrder(self, order, status, auth):
     if is_valid_request(auth):
         Notificator(order).notificate_frontend(status)
         return "OK"
예제 #7
0
 def getBudgetResponse(self, order, price, auth):
     if is_valid_request(auth):
         create_budget(auth.user_id, order, price)
         verify_and_finalize_order(order)
예제 #8
0
 def getTracks(self, artist_name, auth):
     if is_valid_request(auth):
         response = LastFMClient().getArtistTracks(unquote(artist_name))
         logger.info("Backoffice: Returning request for tracks search")
         return response