Auto-delete old nostr events

This commit is contained in:
KoalaSat
2026-01-26 13:23:07 +01:00
parent a0ceeb6705
commit 1f6d1e5c46
4 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,3 @@
wss://nostr.satstralia.com
wss://nostr.robosats.org
wss://relay.damus.io
wss://freelay.sovbit.host

View File

@ -1,8 +1,8 @@
#!/bin/sh
filters_external='{"kinds":[38383]}'
filters_sync="{\"kinds\":[38383],\"since\":$(date -d "2 weeks ago" +%s)}"
timeout_duration="15s"
while IFS= read -r line; do
timeout "$timeout_duration" /app/strfry --config /etc/strfry.conf sync ${line} --filter "$filters_external" --dir both
timeout "$timeout_duration" /app/strfry --config /etc/strfry.conf sync ${line} --filter "$filters_sync" --dir both
done < /app/external_urls.txt

View File

@ -1,8 +1,11 @@
#!/bin/sh
filters_federation='{"kinds":[38383, 31986, 1059]}'
filters_sync="{\"kinds\":[38383,31986,1059],\"since\":$(date -d "4 weeks ago" +%s)}"
filter_delete="{\"until\":$(date -d "4 weeks ago" +%s)}"
timeout_duration="15s"
timeout "$timeout_duration" /app/strfry --config /etc/strfry.conf delete --filter "$filter_delete"
while IFS= read -r line; do
timeout "$timeout_duration" /app/strfry --config /etc/strfry.conf sync ${line} --filter "$filters_federation" --dir both
timeout "$timeout_duration" /app/strfry --config /etc/strfry.conf sync ${line} --filter "$filters_sync" --dir both
done < /app/federation_urls.txt

View File

@ -1,3 +1,3 @@
wss://nostr.satstralia.com
wss://nostr.robosats.org
wss://relay.damus.io
wss://freelay.sovbit.host