@@ -104,25 +104,26 @@ export class SharedArtifactStore extends ArtifactStore {
104
104
// Read file content into a Uint8Array
105
105
const fileContent = await readAll ( readFile ) ;
106
106
console . log ( `Persisting artifact to S3` ) ;
107
- await this . #s3. putObject ( {
107
+ const _ = await this . #s3. putObject ( {
108
108
Bucket : this . #syncConfig. s3Bucket ,
109
109
Body : fileContent ,
110
110
Key : resolveS3Key ( hash ) ,
111
111
} ) ;
112
+ readFile . close ( ) ;
112
113
113
114
return hash ;
114
115
}
115
116
116
117
override async delete ( hash : string ) : Promise < void > {
117
- await this . #s3. deleteObject ( {
118
+ const _ = await this . #s3. deleteObject ( {
118
119
Bucket : this . #syncConfig. s3Bucket ,
119
120
Key : resolveS3Key ( hash ) ,
120
121
} ) ;
121
122
}
122
123
123
124
override async has ( hash : string ) : Promise < boolean > {
124
125
try {
125
- await this . #s3. headObject ( {
126
+ const _ = await this . #s3. headObject ( {
126
127
Bucket : this . #syncConfig. s3Bucket ,
127
128
Key : resolveS3Key ( hash ) ,
128
129
} ) ;
@@ -213,7 +214,7 @@ export class SharedArtifactStore extends ArtifactStore {
213
214
}
214
215
215
216
async #addUrlToRedis( url : string , value : string , expirationDuration : number ) {
216
- await this . #uploadUrls. redisClient . eval (
217
+ const _ = await this . #uploadUrls. redisClient . eval (
217
218
setCmd ,
218
219
[ resolveRedisUrlKey ( url ) ] ,
219
220
[ value , expirationDuration ] ,
@@ -239,14 +240,15 @@ export class SharedArtifactStore extends ArtifactStore {
239
240
}
240
241
241
242
async #removeFromRedis( url : string ) {
242
- await this . #uploadUrls. redisClient . eval (
243
+ const _ = await this . #uploadUrls. redisClient . eval (
243
244
"redis.call('DEL', KEYS[1])" ,
244
245
[ resolveRedisUrlKey ( url ) ] ,
245
246
[ ] ,
246
247
) ;
247
248
}
248
249
249
250
override async close ( ) : Promise < void > {
251
+ this . #s3. destroy ( ) ;
250
252
await deinitRemoteUploadUrlStore ( this . #uploadUrls) ;
251
253
return Promise . resolve ( void null ) ;
252
254
}
0 commit comments