def publish_to_result_topic(self, execution, failed):
    if failed:
        LOGGER.info('Publishing execution to failed executions topic')
        self.error_publisher.send(KAFKA_ERROR_OUTBOUND_TOPIC, value=execution)
        LOGGER.info('Published execution to failed executions topic')
    else:
        LOGGER.info('Publishing execution to successful executions topic')
        self.success_publisher.send(KAFKA_SUCCESS_OUTBOUND_TOPIC, value=execution)
        LOGGER.info('Published execution to successful executions topic')
def publish_to_result_topic(self, execution, failed):
    if failed:
        LOGGER.info('Publishing execution to failed executions topic')
        self.error_publisher.send(KAFKA_ERROR_OUTBOUND_TOPIC, value=execution)
        LOGGER.info('Published execution to failed executions topic')
    else:
        LOGGER.info('Publishing execution to successful executions topic')
        self.success_publisher.send(KAFKA_SUCCESS_OUTBOUND_TOPIC, value=execution)
        LOGGER.info('Published execution to successful executions topic')