docs: consolidate runnable examples and publish v0.1.1 guides
This commit is contained in:
@@ -14,10 +14,10 @@ chmod 700 .local
|
||||
go run ./cmd/orbit-admin bootstrap \
|
||||
--application worker-example --namespace default --environment development \
|
||||
--queue normalization --worker-access --output .local/worker.credentials.json
|
||||
cd sdk/go
|
||||
cd examples
|
||||
ORBIT_URL=http://127.0.0.1:8080 \
|
||||
ORBIT_CREDENTIALS_FILE=../../.local/worker.credentials.json \
|
||||
go run ./examples/worker-protocol
|
||||
ORBIT_CREDENTIALS_FILE=../.local/worker.credentials.json \
|
||||
go run ./worker-protocol
|
||||
```
|
||||
|
||||
预期输出:
|
||||
@@ -26,7 +26,7 @@ ORBIT_URL=http://127.0.0.1:8080 \
|
||||
task=<32位任务ID> final_state=SUCCEEDED attempts=1 result={"text":"HELLO ORBIT"}
|
||||
```
|
||||
|
||||
[完整源码](../../sdk/go/examples/worker-protocol/main.go) 实际提交 `{"text":" Hello Orbit "}`,领取并取得开始授权,执行去首尾空格/转大写,报告结果、查询当前状态并排空。没有生成文件或调用外部服务。每次运行创建独立任务与临时处理器名,避免消费前次示例遗留任务;历史和审计保留,不硬删除。
|
||||
[完整源码](../../examples/worker-protocol/main.go) 实际提交 `{"text":" Hello Orbit "}`,领取并取得开始授权,执行去首尾空格/转大写,报告结果、查询当前状态并排空。没有生成文件或调用外部服务。每次运行创建独立任务与临时处理器名,避免消费前次示例遗留任务;历史和审计保留,不硬删除。
|
||||
|
||||
安全重试可通过 `WorkerFinish.Retryable=true` 声明明确失败允许再试,仅适用于 WorkerFailed;省略为 false。新尝试由服务端决定,详见 [安全重试](../api/retries.md)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user