1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-24 03:54:20 +00:00
royalnet/rocket_league.py

22 lines
582 B
Python
Raw Normal View History

2017-10-05 18:21:47 +00:00
from db import session, Steam, RocketLeague
from time import sleep
def check_for_new_players():
steam_users = session.query(Steam).all()
for user in steam_users:
print(user)
rl = RocketLeague.check_and_create(user.steam_id)
if rl is not None:
session.add(rl)
sleep(1)
session.commit()
def update_existing_players():
rocket_league_players = session.query(RocketLeague).all()
for player in rocket_league_players:
player.update()
session.commit()
if __name__ == "__main__":
check_for_new_players()