Skip to content

Commit

Permalink
Added some logging to identify the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SyberiaK committed Apr 10, 2024
1 parent 9c0db5e commit 0a7969e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions collectors/game_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ async def update_game_version(self):
# We also want to ensure that the data is up to date, so we check datetime
new_data_datetime = (dt.datetime.fromisoformat(data.cs2_version_timestamp)
.replace(tzinfo=VALVE_TIMEZONE).astimezone(dt.UTC))
logging.info(f'{new_data_datetime=}')
is_up_to_date = utime.utcnow() - new_data_datetime < dt.timedelta(hours=12)
logging.info(f'{utime.utcnow()=}')
logging.info(f'{is_up_to_date=}')

if no_cached_data or (is_up_to_date and data.cs2_client_version != self.cache.get('cs2_client_version')):
self.update_cache(data.asdict())
Expand Down

0 comments on commit 0a7969e

Please sign in to comment.