Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
extreme4all authored Nov 16, 2023
1 parent 88439c2 commit b4f6a8d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/jobs/kafka/players/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@ async def parse_data(players: list[dict]) -> tuple[list[Player], int]:
players: list[Player] = [Player(**player) for player in players]
max_id = max([p.id for p in players])

for player in players:
if not (len(player.name) < 13 and is_today(player.updated_at)):
logger.info(player)
# for player in players:
# if not len(player.name) < 13:
# logger.debug(f"len({player.name}) is gt than 13")
# skip = True
# if is_today(player.updated_at):
# logger.debug(f"len({player.updated_at}) is today")

players = [
player
for player in players
if len(player.name) < 13 and is_today(player.updated_at)
if len(player.name) < 13 and not is_today(player.updated_at)
]
return players, max_id

Expand Down

0 comments on commit b4f6a8d

Please sign in to comment.