def __call__(self, parameters):
        DefaultSlave.__call__(self, parameters)

        # Handle the message
        args = self.messageArgs
        msg = "Handling RemoveFromWorkflowManagementLocationList message: %s" % \
                                                                    str(args)
        logging.debug(msg)
        myThread = threading.currentThread()

        # Validate arguments
        if args.has_key("FilesetMatch") and args.has_key("WorkflowId") \
        and args.has_key("Locations"):
            locations = args['Locations'].split(",")
            try:
                myThread.transaction.begin()
                for loc in locations:
                    self.unmarkLocation.execute(workflow = args['WorkflowId'], \
                                                fileset_match = args['FilesetMatch'], \
                                                location = loc, \
                                                conn = myThread.transaction.conn, \
                                                transaction = True)
                myThread.transaction.commit()
            except:
                myThread.transaction.rollback()
                raise
        else:
            logging.error("Received malformed parameters: %s" % str(args))

        # Report as done
        myThread = threading.currentThread()
        myThread.msgService.finish()
Пример #2
0
    def __call__(self, parameters):
        DefaultSlave.__call__(self, parameters)

        # Handle the message
        args = self.messageArgs
        msg = "Handling RemoveFromWorkflowManagementLocationList message: %s" % \
                                                                    str(args)
        logging.debug(msg)
        myThread = threading.currentThread()

        # Validate arguments
        if args.has_key("FilesetMatch") and args.has_key("WorkflowId") \
        and args.has_key("Locations"):
            locations = args['Locations'].split(",")
            try:
                myThread.transaction.begin()
                for loc in locations:
                    self.unmarkLocation.execute(workflow = args['WorkflowId'], \
                                                fileset_match = args['FilesetMatch'], \
                                                location = loc, \
                                                conn = myThread.transaction.conn, \
                                                transaction = True)
                myThread.transaction.commit()
            except:
                myThread.transaction.rollback()
                raise
        else:
            logging.error("Received malformed parameters: %s" % str(args))

        # Report as done
        myThread = threading.currentThread()
        myThread.msgService.finish()
    def __call__(self, parameters):
        DefaultSlave.__call__(self, parameters)

        # Handle the message
        args = self.messageArgs
        logging.debug("Handling RmoveWorkflowFromManagement message: %s" % \
                                                                    str(args))
        myThread = threading.currentThread()

        # Validate arguments
        if args.has_key("FilesetMatch") and args.has_key("WorkflowId"):
            try:
                myThread.transaction.begin()
                self.removeManagedWorkflow.execute(workflow = args['WorkflowId'], \
                                                   fileset_match = args['FilesetMatch'], \
                                                   conn = myThread.transaction.conn, \
                                                   transaction = True)

                myThread.transaction.commit()
            except:
                myThread.transaction.rollback()
                raise
        else:
            logging.error("Received malformed parameters: %s" % str(args))

        # Report as done
        myThread.msgService.finish()
    def __call__(self, parameters):
        DefaultSlave.__call__(self, parameters)

        # Handle the message
        args = self.messageArgs
        logging.debug("Handling AddWorkflowToManage message: %s" % str(args))
        myThread = threading.currentThread()

        # Validate arguments
        if "FilesetMatch" in args and "WorkflowId" in args \
        and "SplitAlgo" in args and "Type" in args:
            try:
                myThread.transaction.begin()
                self.addManagedWorkflow.execute(workflow = args['WorkflowId'], \
                                                fileset_match =  args['FilesetMatch'], \
                                                split_algo =  args['SplitAlgo'], \
                                                type =  args['Type'], \
                                                conn = myThread.transaction.conn, \
                                                transaction = True)
                myThread.transaction.commit()
            except:
                myThread.transaction.rollback()
                raise
        else:
            logging.error("Received malformed parameters: %s" % str(args))

        # Report as done
        myThread = threading.currentThread()
        myThread.msgService.finish()
Пример #5
0
    def __call__(self, parameters):
        DefaultSlave.__call__(self, parameters)

        # Handle the message
        args = self.messageArgs
        logging.debug("Handling AddWorkflowToManage message: %s" % str(args))
        myThread = threading.currentThread()

        # Validate arguments
        if "FilesetMatch" in args and "WorkflowId" in args \
        and "SplitAlgo" in args and "Type" in args:
            try:
                myThread.transaction.begin()
                self.addManagedWorkflow.execute(workflow = args['WorkflowId'], \
                                                fileset_match =  args['FilesetMatch'], \
                                                split_algo =  args['SplitAlgo'], \
                                                type =  args['Type'], \
                                                conn = myThread.transaction.conn, \
                                                transaction = True)
                myThread.transaction.commit()
            except:
                myThread.transaction.rollback()
                raise
        else:
            logging.error("Received malformed parameters: %s" % str(args))

        # Report as done
        myThread = threading.currentThread()
        myThread.msgService.finish()