Exemplo n.º 1
0
 def __init__(self, task, session, pipe, utcnow=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.data_queue = self.task.app.data_queues[self.queue_name]
     if utcnow is None:
         utcnow = util.utcnow()
     self.utcnow = utcnow
Exemplo n.º 2
0
 def __init__(self, task, session,
              min_new=10, max_new=100, remove_task=None):
     DataTask.__init__(self, task, session)
     self.min_new = min_new
     self.max_new = max_new
     self.remove_task = remove_task
     self.updated_areas = set()
Exemplo n.º 3
0
 def __init__(self, task, session, pipe, remove_task=None, update_task=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.remove_task = remove_task
     self.updated_areas = set()
     self.update_task = update_task
     self.data_queue = self.task.app.data_queues[self.queue_name]
Exemplo n.º 4
0
 def __init__(self, task, session,
              api_key_log=False, api_key_name=None,
              insert_cell_task=None, insert_wifi_task=None):
     DataTask.__init__(self, task, session)
     self.api_key_log = api_key_log
     self.api_key_name = api_key_name
     self.insert_cell_task = insert_cell_task
     self.insert_wifi_task = insert_wifi_task
Exemplo n.º 5
0
 def __init__(self, task, session, pipe, api_key=None, email=None, ip=None, nickname=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.api_key = api_key
     self.email = email
     self.ip = ip
     self.nickname = nickname
     self.export_queues = task.app.export_queues
Exemplo n.º 6
0
 def __init__(self, task, session, pipe, api_key=None,
              ip=None, nickname=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.api_key = api_key
     self.ip = ip
     self.nickname = nickname
     self.data_queues = self.task.app.data_queues
Exemplo n.º 7
0
 def __init__(self, task, session,
              api_key_log=False, api_key_name=None,
              insert_cell_task=None, insert_wifi_task=None):
     DataTask.__init__(self, task, session)
     self.api_key_log = api_key_log
     self.api_key_name = api_key_name
     self.insert_cell_task = insert_cell_task
     self.insert_wifi_task = insert_wifi_task
Exemplo n.º 8
0
 def __init__(self, task, session, export_queue_name, queue_key):
     DataTask.__init__(self, task, session)
     self.export_queue_name = export_queue_name
     self.export_queue = task.app.export_queues[export_queue_name]
     self.batch = self.export_queue.batch
     self.metadata = self.export_queue.metadata
     self.queue_key = queue_key
     if not self.queue_key:
         self.queue_key = self.export_queue.queue_key()
Exemplo n.º 9
0
 def __init__(self, task, session, export_queue_name, queue_key):
     DataTask.__init__(self, task, session)
     self.export_queue_name = export_queue_name
     self.export_queue = task.app.export_queues[export_queue_name]
     self.stats_prefix = 'items.export.%s.' % export_queue_name
     self.url = self.export_queue.url
     self.queue_key = queue_key
     if not self.queue_key:  # pragma: no cover
         self.queue_key = self.export_queue.queue_key()
Exemplo n.º 10
0
 def __init__(self,
              task,
              session,
              api_key=None,
              insert_cell_task=None,
              insert_wifi_task=None):
     DataTask.__init__(self, task, session)
     self.api_key = api_key
     self.insert_cell_task = insert_cell_task
     self.insert_wifi_task = insert_wifi_task
Exemplo n.º 11
0
 def __init__(self, task, session, export_queue_name, queue_key):
     DataTask.__init__(self, task, session)
     self.export_queue_name = export_queue_name
     self.export_queue = task.app.export_queues[export_queue_name]
     self.stats_prefix = 'data.export.'
     self.stats_tags = ['key:%s' % export_queue_name]
     self.url = self.export_queue.url
     self.queue_key = queue_key
     if not self.queue_key:  # pragma: no cover
         self.queue_key = self.export_queue.queue_key()
Exemplo n.º 12
0
 def __init__(self, task, session, pipe, api_key=None,
              email=None, ip=None, nickname=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.api_key = api_key
     self.email = email
     self.ip = ip
     self.nickname = nickname
     self.cell_queue = self.task.app.data_queues['update_cell']
     self.wifi_queue = self.task.app.data_queues['update_wifi']
Exemplo n.º 13
0
 def __init__(self,
              task,
              session,
              min_new=10,
              max_new=100,
              remove_task=None):
     DataTask.__init__(self, task, session)
     self.min_new = min_new
     self.max_new = max_new
     self.remove_task = remove_task
     self.updated_areas = set()
Exemplo n.º 14
0
 def __init__(self, task, session, pipe, api_key=None,
              email=None, ip=None, nickname=None,
              insert_cell_task=None, insert_wifi_task=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.api_key = api_key
     self.email = email
     self.ip = ip
     self.nickname = nickname
     self.insert_cell_task = insert_cell_task
     self.insert_wifi_task = insert_wifi_task
Exemplo n.º 15
0
 def __init__(self,
              task,
              session,
              pipe,
              api_key=None,
              ip=None,
              nickname=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.api_key = api_key
     self.ip = ip
     self.nickname = nickname
     self.data_queues = self.task.app.data_queues
Exemplo n.º 16
0
 def __init__(self,
              task,
              session,
              pipe,
              api_key=None,
              email=None,
              ip=None,
              nickname=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.api_key = api_key
     self.email = email
     self.ip = ip
     self.nickname = nickname
     self.export_queues = task.app.export_queues
Exemplo n.º 17
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.redis_key = self.task.app.data_queues['cell_area_update']
     self.utcnow = util.utcnow()
Exemplo n.º 18
0
 def __init__(self, task, session, pipe, shard_id=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.shard_id = shard_id
     self.shard = DataMap.shards().get(shard_id)
Exemplo n.º 19
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.data_queue = self.task.app.data_queues['update_cellarea']
     self.utcnow = util.utcnow()
Exemplo n.º 20
0
 def __init__(self, task, session, api_key=None,
              insert_cell_task=None, insert_wifi_task=None):
     DataTask.__init__(self, task, session)
     self.api_key = api_key
     self.insert_cell_task = insert_cell_task
     self.insert_wifi_task = insert_wifi_task
Exemplo n.º 21
0
 def __init__(self, task, session, pipe):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.today = util.utcnow().date()
Exemplo n.º 22
0
 def __init__(self, task, session, pipe, remove_task=None):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.remove_task = remove_task
     self.updated_areas = set()
Exemplo n.º 23
0
 def __init__(self, task, session, export_name):
     DataTask.__init__(self, task, session)
     self.export_name = export_name
     self.settings = task.app.export_queues[self.export_name]
     self.url = self.settings['url']
Exemplo n.º 24
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.redis_key = self.task.app.data_queues['cell_area_update']
     self.utcnow = util.utcnow()
Exemplo n.º 25
0
 def __init__(self, task, session, pipe):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.today = util.utcnow().date()
Exemplo n.º 26
0
 def __init__(self, task, session, utcnow=None):
     DataTask.__init__(self, task, session)
     if utcnow is None:
         utcnow = util.utcnow()
     self.utcnow = utcnow
Exemplo n.º 27
0
 def __init__(self, task, session, utcnow=None):
     DataTask.__init__(self, task, session)
     if utcnow is None:
         utcnow = util.utcnow()
     self.utcnow = utcnow
Exemplo n.º 28
0
 def __init__(self, task, session, pipe):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
Exemplo n.º 29
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
Exemplo n.º 30
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
Exemplo n.º 31
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.queue = self.task.app.data_queues[self.queue_name]
     self.utcnow = util.utcnow()
Exemplo n.º 32
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.export_queues = task.app.export_queues
Exemplo n.º 33
0
 def __init__(self, task, session, pipe):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.queue = self.task.app.data_queues['update_score']
     self.today = util.utcnow().date()
Exemplo n.º 34
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.export_queues = task.app.export_queues
Exemplo n.º 35
0
 def __init__(self, task, session, export_name):
     DataTask.__init__(self, task, session)
     self.export_name = export_name
     self.settings = task.app.export_queues[self.export_name]
     self.batch = self.settings['batch']
     self.redis_key = self.settings['redis_key']
Exemplo n.º 36
0
 def __init__(self, task, session, export_name):
     DataTask.__init__(self, task, session)
     self.export_name = export_name
     self.settings = task.app.export_queues[self.export_name]
     self.url = self.settings['url']
Exemplo n.º 37
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.utcnow = util.utcnow()
Exemplo n.º 38
0
 def __init__(self, task, session, export_name):
     DataTask.__init__(self, task, session)
     self.export_name = export_name
     self.settings = task.app.export_queues[self.export_name]
     self.batch = self.settings['batch']
     self.redis_key = self.settings['redis_key']