Andriamanitra / clash-search

CodinGame puzzle search

Home Page:https://codingame.tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When clashes are modified they don't get updated in the db

Andriamanitra opened this issue · comments

commented

The script to update clashes looks at timestamps under "statusHistory" key for the clash. Turns out "statusHistory" is not updated when the clash gets updated, for example when someone changes the title of a clash.

statuses = clash["statusHistory"]
clash_timestamps = [status["date"] for status in statuses]
clash_latest_update = max(clash_timestamps, default=0)
if clash_latest_update > last_updated_time:

To fix this I'm writing a new version of the update script that only looks at the "activeVersion" for the clash.