qcfractal/queue/handlers.py
def post(self):
        """Posts complete tasks to the task queue
        """

        body_model, response_model = rest_model("queue_manager", "post")
        body = self.parse_bodymodel(body_model)

        name = self._get_name_from_metadata(body.meta)
        self.logger.info("QueueManager: Received completed task packet from {}.".format(name))
        success, error = self.insert_complete_tasks(self.storage, body.data, self.logger)

        completed = success + error

        response = response_model(
            **{
                "meta": {
                    "n_inserted": completed,
                    "duplicates": [],
                    "validation_errors": [],
                    "success": True,
                    "errors": [],
                    "error_description": "",
                },
                "data": True,
            }
        )
        self.write(response)
        self.logger.info("QueueManager: Inserted {} complete tasks.".format(len(body.data)))

        # Update manager logs
        name = self._get_name_from_metadata(body.meta)
        self.storage.manager_update(name, completed=completed, failures=error)
Posts complete tasks to the task queue
        
Posts complete tasks to the task queue
Posts complete tasks to the task queue
def post(self):
        body_model, response_model = rest_model("queue_manager", "post")
        body = self.parse_bodymodel(body_model)
        name = self._get_name_from_metadata(body.meta)
        self.logger.info("QueueManager: Received completed task packet from {}.".format(name))
        success, error = self.insert_complete_tasks(self.storage, body.data, self.logger)
        completed = success + error
        response = response_model(
            **{
                "meta": {
                    "n_inserted": completed,
                    "duplicates": [],
                    "validation_errors": [],
                    "success": True,
                    "errors": [],
                    "error_description": "",
                },
                "data": True,
            }
        )
        self.write(response)
        self.logger.info("QueueManager: Inserted {} complete tasks.".format(len(body.data)))
        name = self._get_name_from_metadata(body.meta)
        self.storage.manager_update(name, completed=completed, failures=error)
def post ( self ) : body_model , response_model = rest_model ( "queue_manager" , "post" ) body = self . parse_bodymodel ( body_model ) name = self . _get_name_from_metadata ( body . meta ) self . logger . info ( "QueueManager: Received completed task packet from {}." . format ( name ) ) success , error = self . insert_complete_tasks ( self . storage , body . data , self . logger ) completed = success + error response = response_model ( ** { "meta" : { "n_inserted" : completed , "duplicates" : [ ] , "validation_errors" : [ ] , "success" : True , "errors" : [ ] , "error_description" : "" , } , "data" : True , } ) self . write ( response ) self . logger . info ( "QueueManager: Inserted {} complete tasks." . format ( len ( body . data ) ) ) name = self . _get_name_from_metadata ( body . meta ) self . storage . manager_update ( name , completed = completed , failures = error )
Posts complete tasks to the task queue
Posts complete tasks to the task queue
"""Posts complete tasks to the task queue
        """ # Update manager logs
self