Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions backend/druks/browser/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
BROWSER_SESSION_NAME_PATTERN = r"^[a-z](?:[a-z0-9-]*[a-z0-9])?$"
SITE_MAX_LENGTH = 255

WRITER_LOCK_TTL_SECONDS = 60
# TTL-only, no renewal: must outlast the longest borrow, bounded by the
# browser container's 150-minute lease.
WRITER_LOCK_TTL_SECONDS = 3 * 60 * 60
SESSION_LAUNCH_TIMEOUT_SECONDS = 45
SESSION_EXPORT_TIMEOUT_SECONDS = 5 * 60

# A login window holds the session's writer lock and its Redis record for as
# long as it may stay open; both lapse together if the operator walks away, and
# the container's own lease reaps it — nothing sweeps.
# A login window keeps only this Redis record; if the operator walks away it
# lapses and the container's own lease reaps the browser — nothing sweeps.
LOGIN_WINDOW_TTL_SECONDS = 30 * 60
LOGIN_WINDOW_KEY_PREFIX = "browser_login_window:"

Expand Down