Files
NianAIGC/contracts/jobs/jobs-v1.json
T

45 lines
1.7 KiB
JSON

{
"version": 1,
"statuses": ["queued", "running", "succeeded", "failed", "expired", "cancelled"],
"terminalStatuses": ["succeeded", "failed", "expired", "cancelled"],
"idempotency": {
"scope": ["ownerId", "externalClientId", "idempotencyKey"],
"body": {
"settings": { "width": 1024, "height": 768 },
"prompt": "hello",
"idempotencyKey": "body-key",
"capability": "image.generate"
},
"fingerprintSource": {
"capability": "image.generate",
"prompt": "hello",
"settings": { "height": 768, "width": 1024 }
},
"fingerprint": "3ac3128766c0bdac36627b996cb5b3b1ed752794989d559c24f6621988e51a03",
"conflictStatus": 409,
"reusedStatus": 200,
"createdStatus": 202
},
"priority": { "minimum": -100, "maximum": 100, "default": 0 },
"publicList": { "defaultLimit": 50, "minimumLimit": 1, "maximumLimit": 200 },
"claim": { "minimumBatch": 1, "maximumBatch": 20, "defaultLockTimeoutSeconds": 300 },
"retry": {
"defaultMaxAttempts": 3,
"baseDelayMilliseconds": 10000,
"maximumDelayMilliseconds": 300000,
"cases": [
{ "attemptsBefore": 0, "retryable": true, "delayMilliseconds": 10000, "action": "retry_scheduled" },
{ "attemptsBefore": 1, "retryable": true, "delayMilliseconds": 20000, "action": "retry_scheduled" },
{ "attemptsBefore": 2, "retryable": true, "delayMilliseconds": 40000, "action": "retry_scheduled" },
{ "attemptsBefore": 3, "retryable": true, "action": "processed" },
{ "attemptsBefore": 0, "retryable": false, "action": "processed" }
]
},
"cancel": {
"idempotentTerminal": true,
"activeResult": "cancelled",
"clearsLease": true,
"refundKey": "job-refund:{jobId}"
}
}