本文整理汇总了Python中services.managers.eve_api_manager.EveApiManager.get_corp_kills方法的典型用法代码示例。如果您正苦于以下问题:Python EveApiManager.get_corp_kills方法的具体用法?Python EveApiManager.get_corp_kills怎么用?Python EveApiManager.get_corp_kills使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类services.managers.eve_api_manager.EveApiManager
的用法示例。
在下文中一共展示了EveApiManager.get_corp_kills方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_databaseUpdate
# 需要导入模块: from services.managers.eve_api_manager import EveApiManager [as 别名]
# 或者: from services.managers.eve_api_manager.EveApiManager import get_corp_kills [as 别名]
def run_databaseUpdate():
users = User.objects.all()
for user in users:
groups = user.groups.all()
syncgroups = SyncGroupCache.objects.filter(user=user)
add_to_databases(user, groups, syncgroups)
remove_from_databases(user, groups, syncgroups)
# no point if slack isn't enabled
# this isn't really going to run every minute
# cache will stop it
if SlackManager.enabled():
if EveApiManager.check_if_api_server_online():
kill_api = EveApiManager.get_corp_kills(settings.ALLIANCE_EXEC_CORP_ID, settings.ALLIANCE_EXEC_CORP_VCODE)
for kill in kill_api.result:
if not EveManager.check_corporation_kill(kill):
# if sent save to db
if SlackManager.send_kill(kill):
EveManager.create_corporation_kill(kill)
示例2: prime_kills
# 需要导入模块: from services.managers.eve_api_manager import EveApiManager [as 别名]
# 或者: from services.managers.eve_api_manager.EveApiManager import get_corp_kills [as 别名]
def prime_kills():
if EveApiManager.check_if_api_server_online():
kill_api = EveApiManager.get_corp_kills(settings.ALLIANCE_EXEC_CORP_ID, settings.ALLIANCE_EXEC_CORP_VCODE)
for kill in kill_api.result:
EveManager.create_corporation_kill(kill)