Skip to content

Commit

Permalink
[DOP-4451]: Update protect tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry committed May 8, 2024
1 parent 9b0c30d commit 79ebea7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions api/controllers/v2/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr
taskDefinition: TASK_DEFINITION,
cluster: CLUSTER,
launchType: 'FARGATE',
overrides: {
containerOverrides: [{ environment: [{ name: 'INDPENDENT_TASK', value: 'true' }] }],
},
networkConfiguration: {
awsvpcConfiguration: {
subnets: JSON.parse(SUBNETS),
Expand Down
4 changes: 3 additions & 1 deletion src/enhanced/utils/queue/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export async function listenToJobQueue(): Promise<JobsQueuePayload> {
// NOTE: Intentionally not catching here, as this throw should be handled by the method listening to the queue.
// We don't want to continue listening to the queue, as there is something wrong with the protect task mechanism.
// We can let the task end, as it is unsafe to let an unprotected task process a job.
await protectTask();
if (process.env.INDEPENDENT_TASK !== 'yes') {
await protectTask();
}

console.log('[listenToJobQueue]: Deleting message...');

Expand Down

0 comments on commit 79ebea7

Please sign in to comment.