Skip to content

Commit

Permalink
Remove Start processing message back
Browse files Browse the repository at this point in the history
  • Loading branch information
aloftus23 committed Oct 11, 2023
1 parent ccebbfc commit f1ad663
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions backend/src/tasks/scanExecution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ export const handler: Handler = async (event) => {

console.log(commandOptions);

const sqsQueueUrl = process.env.SQS_QUEUE_URL!;
console.log(sqsQueueUrl);
if (!sqsQueueUrl) {
throw new Error('SQS Queue URL not found');
}

// Run command in queue message in Fargate
const params: AWS.ECS.RunTaskRequest = {
cluster: process.env.FARGATE_CLUSTER_NAME!,
Expand All @@ -43,13 +37,6 @@ export const handler: Handler = async (event) => {
const data = await ecs.runTask(params).promise();
console.log('Fargate task started:', data);

// Send a message to the SQS queue to trigger processing
const sqsParams: AWS.SQS.SendMessageRequest = {
MessageBody: 'Start processing...',
QueueUrl: sqsQueueUrl
};
await sqs.sendMessage(sqsParams).promise();

return {
statusCode: 200,
body: JSON.stringify('Fargate task started and message sent to SQS queue')
Expand Down

0 comments on commit f1ad663

Please sign in to comment.