Пример #1
0
Файл: test.py Проект: siq/flux
    def complete(self, session, data):
        id = data['state']['id']
        input = data['state'].get('input') or {}

        expected_outcome = input.get('outcome', 'completed')
        output = input.get('output')
        if output:
            output = {k: surrogate(v) for k, v in output.iteritems()}
        else:
            output = None
        if expected_outcome in ('completed', 'failed'):
            self.push(id, self.outcome(expected_outcome, output))
Пример #2
0
Файл: test.py Проект: siq/flux
    def complete(self, session, data):
        id = data['state']['id']
        input = data['state'].get('input') or {}

        expected_outcome = input.get('outcome', 'completed')
        output = input.get('output')
        if output:
            output = {k: surrogate(v) for k,v in output.iteritems()}
        else:
            output = None
        if expected_outcome in ('completed', 'failed'):
            self.push(id, self.outcome(expected_outcome, output))