Skip to content

Commit

Permalink
Improve fetching HoF hosters (#1569)
Browse files Browse the repository at this point in the history
Fixes #1568.
  • Loading branch information
bwbroersma authored Dec 2, 2024
1 parent cada33e commit 6cd809c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion docker/cron/periodic/15min/download_hof
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ fi

cd /app/manual-hall-of-fame/

curl -fsSL "$HOSTERS_HOF_URL" > /app/manual-hall-of-fame/hosters.yaml
ETAG_FILE='/app/manual-hall-of-fame/hosters.etag';

if [ ! -f "$ETAG_FILE" ]; then
touch "$ETAG_FILE"
fi

if HEADERS=$(curl --compressed -sSfL -H "If-None-Match: $(cat "$ETAG_FILE")" "$HOSTERS_HOF_URL" -o '/app/manual-hall-of-fame/hosters.yaml' -D-); then
echo "$HEADERS" | grep -ioE '^etag: [^\r\n]+' | cut -c6- > "$ETAG_FILE"
fi
2 changes: 1 addition & 1 deletion integration_tests/integration/test_hof.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_cron_manual_hosters_hof(page, app_url, trigger_cron):

page.goto(app_url)
page.get_by_role("link", name="Hall of Fame", exact=True).click()
page.get_by_text("Hosters").click()
page.get_by_text("Hosters", exact=True).click()

hof_content = page.locator(".hof-content")

Expand Down

0 comments on commit 6cd809c

Please sign in to comment.