relayscan
relayscan copied to clipboard
If no fresh data/update, show warning on website
If relayscan-website can't update it's data (i.e. lost connection to DB), it should show a warning on the website after some time
See also
- https://github.com/flashbots/relayscan/blob/main/services/website/webserver.go#L191
- https://github.com/flashbots/relayscan/blob/main/services/website/webserver.go#L150
Error was:
May 18 12:40:08 ip-172-31-22-191 relayscan[805455]: time="2023-05-18T12:40:08Z" level=info msg="updating 7d stats..."
stats for 24h" error="dial tcp DB_IP:5432: connect: connection timed out"
Improvement: instead of just logging the error, if the last generated data is >30min old, show a warning that there may be a problem and the data was last update "XXX time ago"
Ideally also warn if the last slot in the database is more than 30 min old
Related work was done in #44 (show time since last update)
Done with the "time since last update"