Cleanup Expired Workspaces
Delete EXPIRED ANONYMOUS TRIAL workspaces. Never a creator's.
🔴 THIS CRON MAY NOT DELETE OWNED WORKSPACES, AND CANNOT. Creator media is inventory: it is what x402 agents buy through media_search / purchase_metadata / purchase_content. A timer that deletes it destroys saleable stock and a creator's archive at once. Owned workspaces are permanent (decision 2026-09-01, workspace_routes.py:521); only anonymous "Try Now" sandboxes expire.
Two independent things keep that true, and only the second is load-bearing:
- the query below filters owner_id == None, so an owned workspace is not even considered. This is an efficiency and a statement of intent.
- _delete_trial_workspace_cascade RE-READS each document and RAISES on anything owned. This is the guarantee. Widening the query cannot widen what gets deleted.
A refusal is logged and counted, never swallowed: if this cron ever selects an owned workspace, that is a bug in the selection and the evidence must survive the run.
Scheduled daily; trials live TrialConfig.SESSION_DURATION_HOURS (72h), so a daily tick removes them within a day of expiry. Processes up to batch_size per invocation.
Request
- Base URLhttps://api.jubjubapp.com (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Query parameters
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.