Skip to content

Commit

Permalink
Add concurrentTasks to createJob
Browse files Browse the repository at this point in the history
[changelog:added]
  • Loading branch information
cdupuis committed Aug 20, 2019
1 parent 4be9806 commit bb21ac6
Show file tree
Hide file tree
Showing 3 changed files with 2,947 additions and 996 deletions.
4 changes: 4 additions & 0 deletions lib/api-helper/misc/job/createJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export interface JobDetails<T extends ParameterType> {
parameters: T | T[];
name?: string;
description?: string;

/** Optional maximum number of concurrent tasks; defaults to running all tasks in parallel */
concurrentTasks?: number;
}

/**
Expand Down Expand Up @@ -86,6 +89,7 @@ export async function createJob<T extends ParameterType>(details: JobDetails<T>,
parameters: p,
}),
})),
concurrentTasks: details.concurrentTasks,
},
options: MutationNoCacheOptions,
});
Expand Down
2 changes: 2 additions & 0 deletions lib/graphql/mutation/CreateJob.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mutation CreateJob(
$name: String!
$description: String!
$owner: String!
$concurrentTasks: Int
$tasks: [AtmJobTaskInput!]!
) {
createAtmJob(
Expand All @@ -12,6 +13,7 @@ mutation CreateJob(
description: $description
owner: $owner
jobTasks: $tasks
maxRunningTasks: $concurrentTasks
}
) {
id
Expand Down
Loading

0 comments on commit bb21ac6

Please sign in to comment.