Example #1
0
    def setUp(self):
        super(TestTaskActions, self).setUp()
        self._tmppath = tempfile.mkdtemp()
        self.persister = plumpy.PicklePersister(self._tmppath)
        # Add the process launcher
        self.communicator.add_task_subscriber(
            plumpy.ProcessLauncher(self.loop, persister=self.persister))

        self.process_controller = process_comms.RemoteProcessController(
            self.communicator)
Example #2
0
    def setUp(self):
        super(TestRemoteProcessController, self).setUp()

        self.loop = self.io_loop

        message_exchange = "{}.{}".format(self.__class__.__name__,
                                          shortuuid.uuid())
        task_exchange = "{}.{}".format(self.__class__.__name__,
                                       shortuuid.uuid())
        task_queue = "{}.{}".format(self.__class__.__name__, shortuuid.uuid())

        self.communicator = kiwipy.rmq.connect(
            connection_params={'url': 'amqp://*****:*****@localhost:5672/'},
            message_exchange=message_exchange,
            task_exchange=task_exchange,
            task_queue=task_queue,
            testing_mode=True)

        self.process_controller = process_comms.RemoteProcessController(
            self.communicator)
Example #3
0
    def setUp(self):
        super(TestTaskActions, self).setUp()
        self.loop = self.io_loop

        exchange_name = "{}.{}".format(self.__class__.__name__, uuid.uuid4())
        queue_name = "{}.{}.tasks".format(self.__class__.__name__, uuid.uuid4())

        self.rmq_communicator = rmq.connect(
            connection_params={'url': 'amqp://*****:*****@localhost:5672/'},
            message_exchange=exchange_name,
            task_queue=queue_name,
            testing_mode=True
        )
        self.communicator = communications.CommunicatorWrapper(self.rmq_communicator, self.loop)

        self._tmppath = tempfile.mkdtemp()
        self.persister = plumpy.PicklePersister(self._tmppath)
        # Add the process launcher
        self.communicator.add_task_subscriber(plumpy.ProcessLauncher(self.loop, persister=self.persister))

        self.process_controller = process_comms.RemoteProcessController(self.communicator)
Example #4
0
def async_controller(thread_communicator: rmq.RmqThreadCommunicator):
    yield process_comms.RemoteProcessController(thread_communicator)
Example #5
0
    def setUp(self):
        super(TestRemoteProcessController, self).setUp()

        self.init_communicator()
        self.process_controller = process_comms.RemoteProcessController(
            self.communicator)
Example #6
0
def async_controller(loop_communicator: communications.LoopCommunicator):
    yield process_comms.RemoteProcessController(loop_communicator)