Skip to content

Commit 1ac8b5d

Browse files
authored
feat(serverless_jobs): add run options when starting a job (#1978)
1 parent 8f295b8 commit 1ac8b5d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

api/jobs/v1alpha1/jobs_sdk.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ type JobRun struct {
205205

206206
MemoryLimit uint32 `json:"memory_limit"`
207207

208+
Command string `json:"command"`
209+
210+
EnvironmentVariables map[string]string `json:"environment_variables"`
211+
208212
// Region: region to target. If none is passed will use default region from the config.
209213
Region scw.Region `json:"region"`
210214
}
@@ -369,6 +373,15 @@ type StartJobDefinitionRequest struct {
369373

370374
// JobDefinitionID: UUID of the job definition to start.
371375
JobDefinitionID string `json:"-"`
376+
377+
// Command: contextual startup command for this specific job run.
378+
Command *string `json:"command,omitempty"`
379+
380+
// EnvironmentVariables: contextual environment variables for this specific job run.
381+
EnvironmentVariables *map[string]string `json:"environment_variables,omitempty"`
382+
383+
// Replicas: number of jobs to run.
384+
Replicas *uint32 `json:"replicas,omitempty"`
372385
}
373386

374387
// StopJobRunRequest: stop job run request.

0 commit comments

Comments
 (0)