Skip to content

Wake the app with a headless browser, not curl - #10

Merged
vidit-16 merged 1 commit into
mainfrom
fix/keepalive-browser
Sep 27, 2026
Merged

vidit-16 merged 1 commit into
mainfrom
fix/keepalive-browser

Conversation

@vidit-16

Copy link
Copy Markdown
Owner

The keep-awake job has reported success on every run while the app slept. A sleeping Streamlit Community Cloud app answers a plain request with 200 and its "gone to sleep" page, so the curl check passed, and a request without a browser does not count as a visit.

The job now opens the app in headless Chromium, presses Yes, get this app back up! if the sleep page shows, and passes only once the app's root element (stApp) has rendered inside the streamlitApp iframe. It fails if the app does not load within five minutes.

The comment on the schedule now says about 12 hours instead of a few days, which is how long an app goes without a visitor before it sleeps.

Tested: a manual run on this branch passed and logged "the app loaded": https://github.com/vidit-16/DocEngine/actions/runs/36358251996. The app was awake at the time, so the wake-button path has not run in CI yet. The button's label and role match the sleep page as it looked today.

A curl request counted as success while the app slept: Streamlit answers
it with 200 and its sleep page, and only a browser session counts as a
visit. The job now opens the app in Chromium, presses the wake button if
the sleep page shows, and fails unless the app itself loads.
@vidit-16
vidit-16 merged commit cf0683a into main Sep 27, 2026
7 checks passed
@vidit-16
vidit-16 deleted the fix/keepalive-browser branch September 27, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant