Skip to content

Commit

Permalink
Poll nitter instances only in nightly build
Browse files Browse the repository at this point in the history
From the recent changes to twitter/X, it sounds like guest accounts are
now required for nitter, which are more easily rate limited. To avoid
any impact from Farside, the instances are now health checked in the
nightly build using https://status.d420.de (this doesn't seem to be
directly associated with the nitter maintainers, so might not be
entirely future-proof).
  • Loading branch information
benbusby committed Aug 23, 2023
1 parent cc1a040 commit 7e47e95
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/update-instances.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,23 @@ jobs:
apply_update
# ==============================================================
# Nitter update
# ==============================================================
curl -s https://status.d420.de/api/v1/instances | \
jq '[
.hosts |
to_entries[] |
select(.value.healthy == true) |
.value.url ] |
sort' > nitter-tmp.json
jq --slurpfile nitter nitter-tmp.json \
'( .[] | select(.type == "nitter") )
.instances |= $nitter[0]' services-full.json > services.tmp.json
apply_update
# ==============================================================
# SimplyTranslate update
# ==============================================================
Expand Down
4 changes: 2 additions & 2 deletions lib/farside/instances.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ defmodule Farside.Instances do
@debug_header "======== "
@debug_spacer " "

# SearXNG instance uptimes are inspected as part of the nightly Farside build,
# These instance uptimes are inspected as part of the nightly Farside build,
# and should not be included in the constant periodic update.
@skip_service_updates ["searxng"]
@skip_service_updates ["searxng", "nitter"]

def sync() do
File.rename(@update_file, "#{@update_file}-prev")
Expand Down

0 comments on commit 7e47e95

Please sign in to comment.