# 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

    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,
            'discardRequests': cls.default_discard_requests,
            'description': 'ok'
        }

    @classmethod
    def set_poll_interval(cls, value):
        cls.polling_interval = value

    @classmethod
    def get_poll_interval(cls):
        return cls.polling_interval

    @classmethod
    def set_status(cls, service_name, status):
        try:
            service_running = asbool(status['running'])
            cls.services_status[service_name] = {
                'status': 'ok' if service_running else 'unavailable',

# 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


    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,
            'discardRequests': cls.default_discard_requests,
            'description': 'ok'
        }

    @classmethod
    def set_poll_interval(cls, value):
        cls.polling_interval = value

    @classmethod
    def get_poll_interval(cls):
        return cls.polling_interval

    @classmethod
    def set_status(cls, service_name, status):
        try:
            service_running = asbool(status['running'])
            cls.services_status[service_name] = {
                'status': 'ok' if service_running else 'unavailable',

                'running': service_running,