Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Run async work and recurring jobs without a separate worker stack.
@app.task(retries=2, timeout=300) async def sync_threads(owner_id: str): return {"synced": 25, "owner_id": owner_id}
@app.message() async def handle(session: cpsl.Session, msg: cpsl.Message): handle = await sync_threads.submit(owner_id=session.user.owner_id) await session.show_task(handle, message="Sync started")
@app.task( retries=3, timeout=600, lock="owner:{owner_id}", process=True, ) async def rebuild_index(owner_id: str): ...
retries
timeout
lock
process=True
@app.schedule("0 * * * *") async def hourly_sync(): await sync_threads.submit(owner_id="system")
@app.page("Tasks", icon="list-check") def tasks_page(): return cpsl.ui.Page([cpsl.ui.TaskBoard(title="Tasks")])