本文整理汇总了Python中helpers.firebase.firebase_pusher.FirebasePusher.update_event_team_status方法的典型用法代码示例。如果您正苦于以下问题:Python FirebasePusher.update_event_team_status方法的具体用法?Python FirebasePusher.update_event_team_status怎么用?Python FirebasePusher.update_event_team_status使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helpers.firebase.firebase_pusher.FirebasePusher
的用法示例。
在下文中一共展示了FirebasePusher.update_event_team_status方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from helpers.firebase.firebase_pusher import FirebasePusher [as 别名]
# 或者: from helpers.firebase.firebase_pusher.FirebasePusher import update_event_team_status [as 别名]
def get(self, event_key):
event = Event.get_by_id(event_key)
event_teams = EventTeam.query(EventTeam.event==event.key).fetch()
for event_team in event_teams:
status = EventTeamStatusHelper.generate_team_at_event_status(event_team.team.id(), event)
event_team.status = status
FirebasePusher.update_event_team_status(event_key, event_team.team.id(), status)
EventTeamManipulator.createOrUpdate(event_teams)
if 'X-Appengine-Taskname' not in self.request.headers: # Only write out if not in taskqueue
self.response.out.write("Finished calculating event team statuses for: {}".format(event_key))