update refresh interval on readme, add archiving logging

This commit is contained in:
Barry Deen 2024-09-09 18:37:31 -04:00
parent 13d23ee8a2
commit 2aab9f3e49
3 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,8 @@ RELAY_URL="wss://wot.utxo.one"
# where we should store the database # where we should store the database
DB_PATH="db" DB_PATH="db"
# what engine to use for the database: lmdb, badger
DB_ENGINE="lmdb"
# where we should store the index.html and static files # where we should store the index.html and static files
INDEX_PATH="templates/index.html" INDEX_PATH="templates/index.html"
@ -14,4 +16,4 @@ STATIC_PATH="templates/static"
# relay behavior # relay behavior
# how often to refresh the relay's view of the WoT in HOURS # how often to refresh the relay's view of the WoT in HOURS
REFRESH_INTERVAL_HOURS=24 REFRESH_INTERVAL_HOURS=1

View File

@ -37,7 +37,7 @@ RELAY_DESCRIPTION="Your relay description"
DB_PATH="/home/ubuntu/wot-relay/db" # any path you would like the database to be saved. DB_PATH="/home/ubuntu/wot-relay/db" # any path you would like the database to be saved.
INDEX_PATH="/home/ubuntu/wot-relay/templates/index.html" # path to the index.html file INDEX_PATH="/home/ubuntu/wot-relay/templates/index.html" # path to the index.html file
STATIC_PATH="/home/ubuntu/wot-relay/templates/static" # path to the static folder STATIC_PATH="/home/ubuntu/wot-relay/templates/static" # path to the static folder
REFRESH_INTERVAL=24 # interval in hours to refresh the web of trust REFRESH_INTERVAL_HOURS=24 # interval in hours to refresh the web of trust
``` ```
### 4. Build the project ### 4. Build the project

View File

@ -325,6 +325,7 @@ func archiveTrustedNotes(relay *khatru.Relay, ctx context.Context) {
} }
relay.AddEvent(ctx, ev.Event) relay.AddEvent(ctx, ev.Event)
log.Println("📦 archived note from", ev.Event.PubKey)
trustedNotes++ trustedNotes++
} else { } else {
untrustedNotes++ untrustedNotes++