diff --git a/STATUS_MONITOR_README.md b/STATUS_MONITOR_README.md
index 9853782..d74d5d3 100644
--- a/STATUS_MONITOR_README.md
+++ b/STATUS_MONITOR_README.md
@@ -1,7 +1,7 @@
# Service Status Monitor
## Overview
-Server-side monitoring system that checks the availability of asimonson.com services every 2 hours and provides uptime statistics.
+Server-side monitoring system that checks the availability of asimonson.com services every 60 seconds and provides uptime statistics.
## Architecture
@@ -9,20 +9,22 @@ Server-side monitoring system that checks the availability of asimonson.com serv
#### 1. `monitor.py` - Service Monitoring Module
- **Purpose**: Performs automated health checks on all services
-- **Check Interval**: Every 2 hours (7200 seconds)
+- **Check Interval**: Every 60 seconds
- **Services Monitored**:
- asimonson.com
- files.asimonson.com
- git.asimonson.com
- - pass.asimonson.com
- - ssh.asimonson.com
**Features**:
- Tracks response times and HTTP status codes
- Calculates uptime percentages for multiple time periods (24h, 7d, 30d, all-time)
- Persists data to PostgreSQL (`service_checks` table) via `DATABASE_URL` env var
- Gracefully degrades when no database is configured (local dev)
-- Runs in a background thread
+- Runs in a background thread, with each check cycle guarded so a transient
+ failure (DB hiccup, network blip) logs and retries next interval instead of
+ killing the thread
+- Flags the cached summary as `stale` if no check has landed in the last 5
+ intervals, so `/api/status` can't silently keep serving old data as fresh
#### 2. `app.py` - Flask Integration
- **New API Endpoint**: `/api/status`
@@ -39,13 +41,14 @@ Server-side monitoring system that checks the availability of asimonson.com serv
- Displays response times and status codes
- Shows total number of checks performed
- Manual refresh button
-- Auto-refreshes every 5 minutes
+- Auto-refreshes every 60 seconds
#### 2. `static/js/status.js` - Frontend Logic
- Fetches status data from `/api/status` API
- Updates UI with service status and uptime
-- Handles error states gracefully
-- Auto-refresh every 5 minutes
+- Shows a dismissible-on-refresh notice banner when the response is a fetch
+ error, and a persistent notice when the backend flags the data as `stale`
+- Auto-refresh every 60 seconds
#### 3. `static/css/App.css` - Styling
- Color-coded status indicators:
@@ -99,7 +102,7 @@ cd src
python3 app.py
```
-The monitoring will start automatically and perform an initial check immediately, then every 2 hours thereafter.
+The monitoring will start automatically and perform an initial check immediately, then every 60 seconds thereafter.
### Accessing the Status Page
Navigate to: `https://asimonson.com/status`
@@ -115,7 +118,7 @@ To modify monitoring behavior, edit `src/monitor.py`:
```python
# Change check interval (in seconds)
-CHECK_INTERVAL = 7200 # 2 hours
+CHECK_INTERVAL = 60 # 1 minute
# Modify service list
SERVICES = [
@@ -133,6 +136,6 @@ SERVICES = [
- First deployment will show limited uptime data until enough checks accumulate
- Historical data is preserved across server restarts (stored in PostgreSQL)
-- Page auto-refreshes every 5 minutes to show latest server data
+- Page auto-refreshes every 60 seconds to show latest server data
- Manual refresh button available for immediate updates
- All checks performed server-side (no client-side CORS issues)
diff --git a/src/monitor.py b/src/monitor.py
index 80e391e..06540c5 100644
--- a/src/monitor.py
+++ b/src/monitor.py
@@ -22,6 +22,7 @@ SERVICES = [
CHECK_INTERVAL = 60 # seconds between checks
RETENTION_DAYS = 90 # how long to keep records
CLEANUP_INTERVAL = 86400 # seconds between purge runs
+STALE_AFTER = CHECK_INTERVAL * 5 # flag cached data as stale if no check has landed in this long
DATABASE_URL = os.environ.get('DATABASE_URL')
@@ -331,9 +332,21 @@ class ServiceMonitor:
def get_status_summary(self):
"""Return the cached status summary, refreshed once per check cycle
- (see check_all_services), so this never itself touches the database."""
+ (see check_all_services), so this never itself touches the database.
+
+ Adds a `stale` flag computed against wall-clock time, since a summary
+ that stops updating (e.g. the monitor loop hit a persistent error) would
+ otherwise keep reporting its last-known last_check as if it were fresh.
+ """
with self.lock:
- return self._cached_summary
+ summary = dict(self._cached_summary)
+
+ stale = False
+ if summary.get('last_check'):
+ age = (datetime.now() - datetime.fromisoformat(summary['last_check'])).total_seconds()
+ stale = age > STALE_AFTER
+ summary['stale'] = stale
+ return summary
# ── Background loop ───────────────────────────────────────────
@@ -352,21 +365,37 @@ class ServiceMonitor:
finally:
conn.close()
+ def _run_check_cycle(self):
+ """Run one check_all_services() call, catching any exception so a
+ transient failure (DB hiccup, network blip) can't kill the daemon
+ thread -- without this, the thread dies silently and /api/status
+ keeps serving an ever-staler cached summary with nothing to say so."""
+ try:
+ self.check_all_services()
+ except Exception as e:
+ print(f"[monitor] check cycle failed, will retry next interval: {e}")
+
+ def _run_cleanup(self):
+ try:
+ self._purge_old_records()
+ except Exception as e:
+ print(f"[monitor] cleanup failed, will retry next interval: {e}")
+
def start_monitoring(self):
"""Start the background daemon thread for periodic checks and cleanup."""
def monitor_loop():
- self.check_all_services()
- self._purge_old_records()
+ self._run_check_cycle()
+ self._run_cleanup()
checks_since_cleanup = 0
checks_per_cleanup = CLEANUP_INTERVAL // CHECK_INTERVAL
while True:
time.sleep(CHECK_INTERVAL)
- self.check_all_services()
+ self._run_check_cycle()
checks_since_cleanup += 1
if checks_since_cleanup >= checks_per_cleanup:
- self._purge_old_records()
+ self._run_cleanup()
checks_since_cleanup = 0
thread = Thread(target=monitor_loop, daemon=True)
diff --git a/src/static/css/App.css b/src/static/css/App.css
index e27e01c..3017e7c 100755
--- a/src/static/css/App.css
+++ b/src/static/css/App.css
@@ -1137,6 +1137,13 @@ figcaption {
margin-bottom: 1.5rem;
}
+.status-notice {
+ color: var(--warn);
+ border: 1px solid var(--warn);
+ padding: 0.75rem 1rem;
+ margin-bottom: 1.5rem;
+}
+
/* ------------------------------------------------------------------
Books
------------------------------------------------------------------ */
@@ -1396,6 +1403,19 @@ figcaption {
transition: width 0.2s ease, opacity 0.4s ease 0.1s;
}
+.nav-notice {
+ border-bottom: 1px solid var(--bad);
+ color: var(--bad);
+ font-family: var(--font-data);
+ font-size: 0.85rem;
+ text-align: center;
+ padding: 0.6rem 1rem;
+}
+
+.nav-notice[hidden] {
+ display: none;
+}
+
.skip-link {
position: fixed;
top: -100%;
diff --git a/src/static/js/responsive.js b/src/static/js/responsive.js
index 1e0c66e..4436840 100755
--- a/src/static/js/responsive.js
+++ b/src/static/js/responsive.js
@@ -17,9 +17,21 @@ function markCurrentPage(location) {
});
}
+function showNavNotice(message) {
+ const notice = document.getElementById('nav-notice');
+ if (!notice) return;
+ notice.textContent = message;
+ notice.hidden = false;
+}
+
+function hideNavNotice() {
+ const notice = document.getElementById('nav-notice');
+ if (notice) notice.hidden = true;
+}
+
async function goto(location, { push = true, hash = "" } = {}) {
const loadingBar = document.getElementById('loading-bar');
-
+
if (loadingBar) {
loadingBar.style.width = ''; // Clear inline style from previous run
}
@@ -47,6 +59,7 @@ async function goto(location, { push = true, hash = "" } = {}) {
const [metadata, content] = await response.json();
document.dispatchEvent(new Event('beforenavigate'));
+ hideNavNotice();
const root = document.getElementById("root");
root.innerHTML = content;
@@ -79,6 +92,7 @@ async function goto(location, { push = true, hash = "" } = {}) {
} catch (err) {
console.error("Navigation failed:", err);
+ showNavNotice("Couldn't load that page. Check your connection and try again.");
} finally {
clearTimeout(loadingTimeout);
if (loadingBar && loadingBar.classList.contains('active')) {
diff --git a/src/static/js/status.js b/src/static/js/status.js
index 77cb9db..b812fa0 100644
--- a/src/static/js/status.js
+++ b/src/static/js/status.js
@@ -19,6 +19,8 @@ async function fetchStatus() {
}
function updateStatusDisplay(data) {
+ showStaleNotice(!!data.stale);
+
if (data.last_check) {
const lastCheck = new Date(data.last_check);
const lastUpdateEl = document.getElementById('lastUpdate');
@@ -188,7 +190,7 @@ function showError(message) {
const errorDiv = document.createElement('div');
errorDiv.className = 'status-error';
errorDiv.textContent = message;
-
+
const container = document.querySelector('.page');
if (container) {
@@ -197,6 +199,28 @@ function showError(message) {
}
}
+// Persistent (not auto-dismissed) notice that the last successful check is
+// older than expected -- the monitor may have hit a snag, so don't let the
+// page keep implying the numbers below are fresh.
+function showStaleNotice(isStale) {
+ const container = document.querySelector('.page');
+ if (!container) return;
+ let noticeEl = document.getElementById('staleNotice');
+
+ if (!isStale) {
+ if (noticeEl) noticeEl.remove();
+ return;
+ }
+
+ if (!noticeEl) {
+ noticeEl = document.createElement('div');
+ noticeEl.id = 'staleNotice';
+ noticeEl.className = 'status-notice';
+ noticeEl.textContent = 'Data below may be out of date -- the last successful check was longer ago than expected.';
+ container.insertBefore(noticeEl, container.firstChild);
+ }
+}
+
function refreshStatus() {
const refreshBtn = document.getElementById('refreshBtn');
if (refreshBtn) {
diff --git a/src/static/json/books.json b/src/static/json/books.json
index 3f9e4a0..e9464fd 100755
--- a/src/static/json/books.json
+++ b/src/static/json/books.json
@@ -80,12 +80,12 @@
"No, They Can't": {
"filename": "no-they-cant.jpeg",
"link": "https://www.goodreads.com/book/show/13260131-no-they-can-t",
- "review": "I much preferred Give Me A Break (which I read first). Sossel's writing style in this book is less developed - it feels aimless and with an intent to lecture."
+ "review": "I much preferred Give Me A Break (which I read first). Stossel's writing style in this book is less developed - it feels aimless and with an intent to lecture."
},
"Give Me a Break": {
"filename": "giveMeABreak.jpeg",
"link": "https://www.amazon.com/Give-Me-Break-Exposed-Hucksters-ebook/dp/B000FC2NF8/",
- "review": "I expected a boring autobiography-type book, but instead is a glimpse inside Stossel's work that transformed itself as it transformed his view. Was very happy to see a figure of similar personal ideology. Probably made it a little too easy to swallow that pill."
+ "review": "I expected a boring autobiography-type book, but instead is a glimpse inside Stossel's work that transformed itself as it transformed his view."
},
"Reign of Terror": {
"filename": "reignofterror.jpg",
@@ -125,7 +125,7 @@
"The Scout Mindset": {
"filename": "scoutMindset.png",
"link": "https://www.amazon.com/Scout-Mindset-People-Things-Clearly-ebook/dp/B07L2HQ26K/",
- "review": "Felt like a list of things that I already do that I should be more mindful of. Maybe that's just me. There was some interesting mental probablism sprinkled in the first half but the second half did not have much new to say. Good but not eye-opening."
+ "review": "Felt like a list of things that I already do that I should be more mindful of. Maybe that's just me. There was some interesting mental probabilism sprinkled in the first half but the second half did not have much new to say. Good but not eye-opening."
},
"Verbal Judo": {
"filename": "verbalJudo.png",
@@ -150,7 +150,7 @@
"Where Good Ideas Come From": {
"filename": "where-good-ideas-come-from.png",
"link": "https://www.goodreads.com/book/show/8034188-where-good-ideas-come-from",
- "review": "I got this book at a recycling center. I didn't want to read it or like it. Unfortnuately, it's pretty good. 200 pages of considerate review of how innovation comes to be + suggestions to expand the utility of your ideas (I've adopted several!)"
+ "review": "I got this book at a recycling center. I didn't want to read it or like it. Unfortunately, it's pretty good. 200 pages of considerate review of how innovation comes to be + suggestions to expand the utility of your ideas (I've adopted several!)"
},
"12 Rules for Life": {
"filename": "12RulesForLife.jpg",
diff --git a/src/static/json/projects.json b/src/static/json/projects.json
index 6002baa..3fa6505 100755
--- a/src/static/json/projects.json
+++ b/src/static/json/projects.json
@@ -7,7 +7,7 @@
"links": [
[
"globe",
- "http://files.asimonson.com/u/AIcodeSmells.pdf",
+ "https://files.asimonson.com/u/AIcodeSmells.pdf",
"Paper"
]
]
@@ -20,7 +20,7 @@
"links": [
[
"globe",
- "http://files.asimonson.com/u/blanketTrust.pdf",
+ "https://files.asimonson.com/u/blanketTrust.pdf",
"Paper"
]
]
@@ -83,7 +83,7 @@
"Portfolio Website": {
"status": "complete",
"classes": "programming",
- "content": "This website is my personal sandbox where I've integrated some of my data projects via docker cluster. It is self hosted and zero-trust secure while remaining dynamic and free of the tech debt that comes with pre-designed sites and excessive framework application. Yeah, I can do E2E.",
+ "content": "This website is my personal sandbox where I've integrated some of my data projects via docker cluster. It is self hosted and dynamic, generally free of the tech debt that comes with pre-designed sites and excessive framework application. Yeah, I can do E2E.",
"links": [
["globe", "https://asimonson.com", "Homepage"],
[
diff --git a/src/static/readme-stats-vercel-01-25-2023.svg b/src/static/readme-stats-vercel-01-25-2023.svg
deleted file mode 100755
index 353531c..0000000
--- a/src/static/readme-stats-vercel-01-25-2023.svg
+++ /dev/null
@@ -1,142 +0,0 @@
-
\ No newline at end of file
diff --git a/src/static/sitemap.xml b/src/static/sitemap.xml
index 3c10b55..aec9c92 100755
--- a/src/static/sitemap.xml
+++ b/src/static/sitemap.xml
@@ -1,11 +1,27 @@
I'm Andrew Simonson, a data scientist at Ecolab and a graduate data - science student at Rochester Institute of Technology, where I recently - finished a B.S. in Computer Science with a minor in international - relations and a focus on probability theory. + science student at Rochester Institute of Technology, pursuing an M.S. + in Data Science after finishing a B.S. in Computer Science with a + minor in international relations and a focus on probability theory.
@@ -43,7 +43,7 @@UC San Diego on edX · - program certificate + program certificate
September 2026
+Today
I wasn't really expecting anyone to read this far. - If you're looking for shared resources you've taken a wrong turn. + If you're looking for shared resources you've taken a wrong turn. +
From here, we'll rekindle the future.
diff --git a/src/templates/hotspots.html b/src/templates/hotspots.html deleted file mode 100755 index 022b220..0000000 --- a/src/templates/hotspots.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - diff --git a/src/templates/iframe.html b/src/templates/iframe.html deleted file mode 100755 index 55f2097..0000000 --- a/src/templates/iframe.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "header.html" %} -{% block header %}{% endblock %} -{% block footer %}{% endblock %} -{% block content %}{% endblock %} \ No newline at end of file diff --git a/src/templates/partials/idler.html b/src/templates/partials/idler.html deleted file mode 100755 index e69de29..0000000