From b4f6a8d67eac319b922cce2ca57b512a7b504ab7 Mon Sep 17 00:00:00 2001 From: extreme4all <40169115+extreme4all@users.noreply.github.com> Date: Thu, 16 Nov 2023 21:25:12 +0100 Subject: [PATCH] bug fix --- src/jobs/kafka/players/main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/jobs/kafka/players/main.py b/src/jobs/kafka/players/main.py index 11b6942..7c7b333 100644 --- a/src/jobs/kafka/players/main.py +++ b/src/jobs/kafka/players/main.py @@ -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