Esempio n. 1
0
File: test.py Progetto: 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))
Esempio n. 2
0
File: test.py Progetto: 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))