本文整理汇总了Python中Configuration.Configuration.celeryNewsPaperRedisUrl方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.celeryNewsPaperRedisUrl方法的具体用法?Python Configuration.celeryNewsPaperRedisUrl怎么用?Python Configuration.celeryNewsPaperRedisUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration.Configuration
的用法示例。
在下文中一共展示了Configuration.celeryNewsPaperRedisUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from Configuration import Configuration [as 别名]
# 或者: from Configuration.Configuration import celeryNewsPaperRedisUrl [as 别名]
import sys, os
_root = os.path.dirname(os.path.abspath(__file__)).split(os.path.sep)[:-1]
sys.path.extend([
os.path.sep.join(_root + ['ThirdParty']),
os.path.sep.join(_root + ['Configuration']),
os.path.sep.join(_root + ['Common']),
os.path.sep.join(_root + ['DB']),
os.path.sep.join(_root + ['Library']),
os.path.sep.join(_root)
])
import InitializeConfiguration
from Configuration import Configuration
import urlparse
redis_url = Configuration.celeryNewsPaperRedisUrl()
redis_info = urlparse.urlsplit(redis_url)
CELERY_IMPORTS = (
'celery_tasks.fetch_news',
)
BROKER_URL = redis_url
CELERY_RESULT_BACKEND = 'redis'
CELERYD_LOG_LEVEL = Configuration.logFileLevel().upper()
CELERY_SEND_EVENTS = True
CELERYD_POOL = 'eventlet'
CELERYD_CONCURRENCY = 500
CELERYD_HIJACK_ROOT_LOGGER = False
CELERY_DEFAULT_QUEUE = 'default'