Пример #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
Пример #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()
Пример #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]
Пример #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
Пример #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
Пример #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
Пример #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
Пример #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()
Пример #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()
Пример #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
Пример #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()
Пример #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']
Пример #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()
Пример #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
Пример #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
Пример #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
Пример #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()
Пример #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)
Пример #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()
Пример #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
Пример #21
0
 def __init__(self, task, session, pipe):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.today = util.utcnow().date()
Пример #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()
Пример #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']
Пример #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()
Пример #25
0
 def __init__(self, task, session, pipe):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
     self.today = util.utcnow().date()
Пример #26
0
 def __init__(self, task, session, utcnow=None):
     DataTask.__init__(self, task, session)
     if utcnow is None:
         utcnow = util.utcnow()
     self.utcnow = utcnow
Пример #27
0
 def __init__(self, task, session, utcnow=None):
     DataTask.__init__(self, task, session)
     if utcnow is None:
         utcnow = util.utcnow()
     self.utcnow = utcnow
Пример #28
0
 def __init__(self, task, session, pipe):
     DataTask.__init__(self, task, session)
     self.pipe = pipe
Пример #29
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
Пример #30
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
Пример #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()
Пример #32
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.export_queues = task.app.export_queues
Пример #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()
Пример #34
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.export_queues = task.app.export_queues
Пример #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']
Пример #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']
Пример #37
0
 def __init__(self, task, session):
     DataTask.__init__(self, task, session)
     self.utcnow = util.utcnow()
Пример #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']