def __init__(self, ioloop=None, config=None): self._ioloop = ioloop or IOLoop.instance() self.logger = get_logger('heartbeat_data') self.config = config self._pollers = {} self._listeners = [] self._events = [] self._bootstrap_queue = Queue.Queue() self._register_pollers()
def initialize(self, api_pool, heartbeat): self.logger = get_logger('websocket') self._api = api_pool self._heartbeat = heartbeat self._default_subscriptions = { "query_response": True, "bookmark_callback": True } self._subscriptions = { }
def __init__(self, heartbeat, config): BasePoller.__init__(self, heartbeat, config) self.api = LinksApi(config) self.logger = get_logger('links_poller') self.register_event('links', subscribable=True) self._links = self._get_links()
def __init__(self, heartbeat_data): SuperThread.__init__(self) self._heartbeat_data = heartbeat_data self.logger = get_logger('heartbeat')
def __init__(self, heartbeat, config): BasePoller.__init__(self, heartbeat, config) self.api = LocationsApi(config) self.logger = get_logger('locations_poller') self.register_event('locations', subscribable=True) self._locations = []
from eklhad.util import get_logger import tornado.httpserver import tornado.log import tornado.web import tornado.auth import tornado.options import multiprocessing import threading import signal import os BASE_PATH = os.path.dirname(__file__) TEMPLATE_PATH = os.path.realpath(os.path.join(BASE_PATH, 'templates')) STATIC_PATH = os.path.realpath(os.path.join(BASE_PATH, "static")) logger = get_logger('eklhad') def is_int(val): try: int(val) return True except ValueError: return False class StaticHandler(tornado.web.StaticFileHandler): def get_content_type(self): return super(StaticHandler, self).get_content_type() def parse_url_path(self, url_path): url_path = super(StaticHandler, self).parse_url_path(url_path)