# Path: turbulenz_local/lib/exceptions.py
# class ApiUnavailable(ApiException):
#     pass
# 
# class ApiNotImplemented(ApiException):
#     pass


from decorator import decorator
from turbulenz_local.lib.exceptions import ApiUnavailable, ApiNotImplemented
from paste.deploy.converters import asbool
# Copyright (c) 2011-2013 Turbulenz Limited



# pylint: disable=F0401
# pylint: enable=F0401

class InvalidStatus(BaseException):
    pass

class ServiceStatus(object):

    # interval in seconds to poll our service status URL
    polling_interval = 4

    services_status = {}
    # requests are not queued up client-side if this is true
    # (should be true for any long polling interval to avoid
    # overloading our services)
    default_discard_requests = False

    @classmethod
    def set_ok(cls, service_name):
        cls.services_status[service_name] = {
            'status': 'ok',

# Path: turbulenz_local/lib/exceptions.py
# class ApiUnavailable(ApiException):
#     pass
# 
# class ApiNotImplemented(ApiException):
#     pass


# Path: turbulenz_local/lib/servicestatus.py
from decorator import decorator
from turbulenz_local.lib.exceptions import ApiUnavailable, ApiNotImplemented
from paste.deploy.converters import asbool

# Copyright (c) 2011-2013 Turbulenz Limited



# pylint: disable=F0401
# pylint: enable=F0401

class InvalidStatus(BaseException):
    pass

class ServiceStatus(object):

    # interval in seconds to poll our service status URL
    polling_interval = 4

    services_status = {}
    # requests are not queued up client-side if this is true
    # (should be true for any long polling interval to avoid
    # overloading our services)
    default_discard_requests = False

    @classmethod
    def set_ok(cls, service_name):
        cls.services_status[service_name] = {
            'status': 'ok',

            'running': True,