Skip to content

Commit 7253868

Browse files
authored
refactor claims (#1200)
* refactor claims
1 parent 564decf commit 7253868

10 files changed

Lines changed: 1024 additions & 86 deletions

File tree

docs/env.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ The `DOCKER_COMPUTE_ENVIRONMENTS` environment variable should be a JSON array of
197197
- **socketPath**: Path to the Docker socket (e.g., docker.sock).
198198
- **imageRetentionDays** - how long docker images are kept, in days. Default: 7
199199
- **imageCleanupInterval** - how often to run cleanup for docker images, in seconds. Min: 3600 (1hour), Default: 86400 (24 hours)
200+
- **paymentClaimInterval** - how often to run payment claiming, in seconds. Default: 3600 (1 hour)
200201
- **storageExpiry**: Amount of seconds for storage expiry.(Mandatory)
201202
- **maxJobDuration**: Maximum duration in seconds for a job.(Mandatory)
202203
- **minJobDuration**: Minimum duration in seconds for a job.(Mandatory)

src/@types/C2D/C2D.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export interface C2DDockerConfig {
144144
access: ComputeAccessList
145145
imageRetentionDays?: number // Default: 7 days
146146
imageCleanupInterval?: number // Default: 86400 seconds (24 hours)
147+
paymentClaimInterval?: number // Default: 3600 seconds (1 hours)
147148
}
148149

149150
export type ComputeResultType =
@@ -312,7 +313,9 @@ export enum C2DStatusNumber {
312313
// eslint-disable-next-line no-unused-vars
313314
ResultsUploadFailed = 62,
314315
// eslint-disable-next-line no-unused-vars
315-
JobFinished = 70
316+
JobFinished = 70,
317+
// eslint-disable-next-line no-unused-vars
318+
JobSettle = 71
316319
}
317320
export enum C2DStatusText {
318321
// eslint-disable-next-line no-unused-vars
@@ -358,5 +361,7 @@ export enum C2DStatusText {
358361
// eslint-disable-next-line no-unused-vars
359362
ResultsUploadFailed = 'Failed to upload results to storage',
360363
// eslint-disable-next-line no-unused-vars
361-
JobFinished = 'Job finished'
364+
JobFinished = 'Job finished',
365+
// eslint-disable-next-line no-unused-vars
366+
JobSettle = 'Job settling'
362367
}

src/@types/Escrow.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export interface EscrowAuthorization {
1010
export interface EscrowLock {
1111
jobId: BigInt
1212
payer: string
13-
payee: string
1413
amount: BigInt
1514
expiry: BigInt
1615
token: string

0 commit comments

Comments
 (0)