PR feedback

cloud-runner-develop
Frostebite 2025-12-04 22:44:55 +00:00
parent a726260ddc
commit 3efb715fd5
2 changed files with 6 additions and 9 deletions

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -4,10 +4,7 @@ import {
ListStacksCommand, ListStacksCommand,
} from '@aws-sdk/client-cloudformation'; } from '@aws-sdk/client-cloudformation';
import type { StackSummary } from '@aws-sdk/client-cloudformation'; import type { StackSummary } from '@aws-sdk/client-cloudformation';
import { import { DescribeLogGroupsCommand, DescribeLogGroupsCommandInput } from '@aws-sdk/client-cloudwatch-logs';
DescribeLogGroupsCommand,
DescribeLogGroupsCommandInput,
} from '@aws-sdk/client-cloudwatch-logs';
import type { LogGroup } from '@aws-sdk/client-cloudwatch-logs'; import type { LogGroup } from '@aws-sdk/client-cloudwatch-logs';
import { DescribeTasksCommand, ListClustersCommand, ListTasksCommand } from '@aws-sdk/client-ecs'; import { DescribeTasksCommand, ListClustersCommand, ListTasksCommand } from '@aws-sdk/client-ecs';
import type { Task } from '@aws-sdk/client-ecs'; import type { Task } from '@aws-sdk/client-ecs';
@ -104,9 +101,7 @@ export class TaskService {
{ {
let nextToken: string | undefined; let nextToken: string | undefined;
do { do {
const taskResponse = await ecs.send( const taskResponse = await ecs.send(new ListTasksCommand({ cluster: element, nextToken }));
new ListTasksCommand({ cluster: element, nextToken }),
);
taskArns.push(...(taskResponse.taskArns ?? [])); taskArns.push(...(taskResponse.taskArns ?? []));
nextToken = taskResponse.nextToken; nextToken = taskResponse.nextToken;
} while (nextToken); } while (nextToken);
@ -206,7 +201,9 @@ export class TaskService {
public static async getLocks(): Promise<Array<{ Key: string }>> { public static async getLocks(): Promise<Array<{ Key: string }>> {
process.env.AWS_REGION = Input.region; process.env.AWS_REGION = Input.region;
if (CloudRunner.buildParameters.storageProvider === 'rclone') { if (CloudRunner.buildParameters.storageProvider === 'rclone') {
const objects = await (SharedWorkspaceLocking as unknown as { listObjects(prefix: string): Promise<string[]> }).listObjects(''); const objects = await (
SharedWorkspaceLocking as unknown as { listObjects(prefix: string): Promise<string[]> }
).listObjects('');
return objects.map((x: string) => ({ Key: x })); return objects.map((x: string) => ({ Key: x }));
} }
const s3 = AwsClientFactory.getS3(); const s3 = AwsClientFactory.getS3();