本文整理汇总了Python中ichnaea.data.base.DataTask.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python DataTask.__init__方法的具体用法?Python DataTask.__init__怎么用?Python DataTask.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ichnaea.data.base.DataTask
的用法示例。
在下文中一共展示了DataTask.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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]
示例2: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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
示例3: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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()
示例4: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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
示例5: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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
示例6: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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
示例7: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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()
示例8: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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']
示例10: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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
示例11: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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)
示例12: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
def __init__(self, task, session):
DataTask.__init__(self, task, session)
self.data_queue = self.task.app.data_queues['update_cellarea']
self.utcnow = util.utcnow()
示例13: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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']
示例14: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
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()
示例15: __init__
# 需要导入模块: from ichnaea.data.base import DataTask [as 别名]
# 或者: from ichnaea.data.base.DataTask import __init__ [as 别名]
def __init__(self, task, session, utcnow=None):
DataTask.__init__(self, task, session)
if utcnow is None:
utcnow = util.utcnow()
self.utcnow = utcnow