File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,7 @@ export class DualBlobStorage implements BlobStorage {
2323 }
2424
2525 async getObject ( data : { key : string ; abortSignal ?: AbortSignal } ) : Promise < BlobObject > {
26- try {
27- return await this . primary . getObject ( data ) ;
28- } catch {
29- return await this . secondary . getObject ( data ) ;
30- }
26+ return await Promise . any ( [ this . primary . getObject ( data ) , this . secondary . getObject ( data ) ] ) ;
3127 }
3228
3329 async removeDirectory ( data : { key : string ; abortSignal ?: AbortSignal } ) : Promise < number > {
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ export const envVariables = z
167167 */
168168 S3_FAILOVER_STORAGE_URL : z . string ( ) . optional ( ) ,
169169 S3_FAILOVER_ENDPOINT : z . string ( ) . optional ( ) ,
170- S3_FAILOVER_REGION : z . string ( ) . optional ( ) ,
170+ S3_FAILOVER_REGION : z . string ( ) . default ( 'auto' ) ,
171171 S3_FAILOVER_ACCESS_KEY_ID : z . string ( ) . optional ( ) ,
172172 S3_FAILOVER_SECRET_ACCESS_KEY : z . string ( ) . optional ( ) ,
173173 S3_FAILOVER_FORCE_PATH_STYLE : z
You can’t perform that action at this time.
0 commit comments