How to use the eliot.write_failure function in eliot

To help you get started, we’ve selected a few eliot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ClusterHQ / flocker / flocker / acceptance / testtools.py View on Github external
def failed_query(failure):
            reasons = getattr(failure.value, 'reasons', None)
            if reasons is None:
                # Guess it was something else.  Do some simpler logging.
                write_failure(failure, logger=None)
            else:
                # It is one of those.  Log all of the stuff from inside it.
                for reason in reasons:
                    write_failure(reason, logger=None)
            return False
        d = cluster.current_nodes()
github ClusterHQ / flocker / flocker / acceptance / testtools.py View on Github external
def failed_query(failure):
            reasons = getattr(failure.value, 'reasons', None)
            if reasons is None:
                # Guess it was something else.  Do some simpler logging.
                write_failure(failure, logger=None)
            else:
                # It is one of those.  Log all of the stuff from inside it.
                for reason in reasons:
                    write_failure(reason, logger=None)
            return False
        d = cluster.current_nodes()
github ClusterHQ / flocker / flocker / acceptance / testtools.py View on Github external
def failed_query(failure):
            reasons = getattr(failure.value, 'reasons', None)
            if reasons is None:
                # Guess it was something else.  Do some simpler logging.
                write_failure(failure, logger=None)
            else:
                # It is one of those.  Log all of the stuff from inside it.
                for reason in reasons:
                    write_failure(reason, logger=None)
            return False
        d = cluster.current_nodes()
github ClusterHQ / flocker / flocker / acceptance / testtools.py View on Github external
def failed_query(failure):
            reasons = getattr(failure.value, 'reasons', None)
            if reasons is None:
                # Guess it was something else.  Do some simpler logging.
                write_failure(failure, logger=None)
            else:
                # It is one of those.  Log all of the stuff from inside it.
                for reason in reasons:
                    write_failure(reason, logger=None)
            return False
        d = cluster.current_nodes()
github ClusterHQ / flocker / benchmark / scenarios / _request_load.py View on Github external
def handle_request_error(result):
            self.rate_measurer.request_failed(result)
            write_failure(result)
github ClusterHQ / flocker / admin / cluster_setup.py View on Github external
def got_all_nodes():
        d = client.list_nodes()
        d.addErrback(write_failure)

        def check_node_count(nodes):
            print("Waiting for nodes, "
                  "got {} out of {}".format(len(nodes), count))
            return len(nodes) >= count

        d.addCallback(check_node_count)
        return d
github LeastAuthority / leastauthority.com / src / lae_automation / subscription_converger.py View on Github external
def g(*a, **kw):
        action = start_action(action_type=scope + u":" + f.__name__)
        with action.context():
            d = DeferredContext(maybeDeferred(f, *a, **kw))
            d.addErrback(write_failure)
            return d.addActionFinish()
    return g
github LeastAuthority / leastauthority.com / src / lae_util / service.py View on Github external
def _failed(self, reason):
        self._d = None
        write_failure(reason)
github ClusterHQ / flocker / flocker / provision / _aws.py View on Github external
def instance_error(failure):
            Message.log(
                message_type="flocker:provision:aws:async_get_node:failed"
            )
            instance.terminate()
            write_failure(failure)
            return failure