コード例 #1
0
    def setUp(self):
        """Set up environment."""

        confparser = ConfigParser()
        confparser.add_section('bureaucrat')
        confparser.set('bureaucrat', 'storage_dir', STORAGE_DIR)
        Configs.instance(confparser)
        self.wflow = Workflow.create_from_string(processdsc, 'fake-id')
コード例 #2
0
ファイル: test_workflow.py プロジェクト: aardsoft/bureaucrat
    def setUp(self):
        """Set up environment."""

        confparser = ConfigParser()
        confparser.add_section('bureaucrat')
        confparser.set('bureaucrat', 'storage_dir', STORAGE_DIR)
        Configs.instance(confparser)
        self.wflow = Workflow.create_from_string(processdsc, 'fake-id')
コード例 #3
0
ファイル: bureaucrat.py プロジェクト: aardsoft/bureaucrat
    def launch_process(self, channel, method, header, body):
        """Handle delivery."""

        LOG.debug("Method: %r", method)
        LOG.debug("Header: %r", header)
        LOG.debug("Body: %r", body)
        wflow = Workflow.create_from_string(body, "%s" % uuid.uuid4())
        chwrapper = ChannelWrapper(channel)
        chwrapper.send(
            Message(name='start', target=wflow.process.id, origin=''))
        channel.basic_ack(method.delivery_tag)
コード例 #4
0
ファイル: bureaucrat.py プロジェクト: aardsoft/bureaucrat
    def launch_process(self, channel, method, header, body):
        """Handle delivery."""

        LOG.debug("Method: %r", method)
        LOG.debug("Header: %r", header)
        LOG.debug("Body: %r", body)
        wflow = Workflow.create_from_string(body, "%s" % uuid.uuid4())
        chwrapper = ChannelWrapper(channel)
        chwrapper.send(Message(name='start', target=wflow.process.id,
                               origin=''))
        channel.basic_ack(method.delivery_tag)