Remove async keyword from anon limiter fn
Signed-off-by: Matei David <matei.david.35@gmail.com>
This commit is contained in:
@@ -150,10 +150,8 @@ export class AwsS3Publish implements PublisherBase {
|
||||
Body: fileContent,
|
||||
};
|
||||
|
||||
// Rate limit the concurrent execution of file uploads to batches of 10
|
||||
const uploadFile = limiter(async () =>
|
||||
this.storageClient.putObject(params),
|
||||
);
|
||||
// Rate limit the concurrent execution of file uploads to batches of 10 (per publish)
|
||||
const uploadFile = limiter(() => this.storageClient.putObject(params));
|
||||
uploadPromises.push(uploadFile);
|
||||
}
|
||||
await Promise.all(uploadPromises);
|
||||
|
||||
@@ -113,8 +113,8 @@ export class GoogleGCSPublish implements PublisherBase {
|
||||
const entityRootDir = `${entity.metadata.namespace}/${entity.kind}/${entity.metadata.name}`;
|
||||
const destination = `${entityRootDir}/${relativeFilePath}`; // GCS Bucket file relative path
|
||||
|
||||
// Rate limit the concurrent execution of file uploads to batches of 10
|
||||
const uploadFile = limiter(async () =>
|
||||
// Rate limit the concurrent execution of file uploads to batches of 10 (per publish)
|
||||
const uploadFile = limiter(() =>
|
||||
this.storageClient
|
||||
.bucket(this.bucketName)
|
||||
.upload(filePath, { destination }),
|
||||
|
||||
Reference in New Issue
Block a user