发现优质的 AI Agent 技能
聚合 Claude Skills、LangChain、AutoGPT 等优质资源,助力开发者快速构建智能应用
Client waits for entire response
response = call_llm(prompt) return response ``` **Correct (streaming results):**
Polling is inefficient and not durable
while True: status = check_payment_status() if status == "paid": break time.sleep(1)
Client code to read events
@app.post("/start") def start_workflow(): handle = DBOS.start_workflow(long_workflow) return {"workflow_id": handle.get_workflow_id()} @app.get("/status/{workflow_id}")
Connection leaked - no destroy()!
``` **Correct (with cleanup):**
Missing workflow_name and queue_name!
handle = client.enqueue({}, task_data) ``` **Correct (with required options):**
Deploying new code directly kills in-progress workflows
@DBOS.workflow() def workflow(): step_a() step_b()
Original
@DBOS.workflow() def workflow(): foo() bar() @DBOS.workflow()
Don't use sync sleep in async workflow!
DBOS.sleep(10) handle = DBOS.start_workflow(other_async_workflow) ```
Section Definitions
This file defines the rule categories for DBOS Python best practices. Rules are automatically assigned to sections based on their filename prefix.
dbos-python
> **Note:** `CLAUDE.md` is a symlink to this file.
workflow timeout
来自 sickn33/antigravity-awesome-skills 技能
workflow introspection
来自 sickn33/antigravity-awesome-skills 技能