Skip to content

Commit

Permalink
use resilient os decorator to overcome network failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Apr 20, 2024
1 parent d5b8964 commit f9d9dba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions proofs/adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
Filesystem,
Region,
};
use Innmind\OperatingSystem\Factory as OSFactory;
use Innmind\OperatingSystem\{
Factory as OSFactory,
OperatingSystem\Resilient,
};
use Innmind\Url\Url;
use Properties\Innmind\Filesystem\Adapter;
use Innmind\BlackBox\{
Expand All @@ -24,7 +27,7 @@
$dotenv->load($file);
}

$os = OSFactory::build();
$os = Resilient::of(OSFactory::build());
$bucket = Factory::of($os)->build(
Url::of(\getenv('S3_URL') ?? throw new Exception('Env var missing')),
Region::of(\getenv('S3_REGION') ?? throw new Exception('Env var missing')),
Expand Down
7 changes: 5 additions & 2 deletions proofs/bucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
Region,
Exception\LogicException,
};
use Innmind\OperatingSystem\Factory as OSFactory;
use Innmind\OperatingSystem\{
Factory as OSFactory,
OperatingSystem\Resilient,
};
use Innmind\Filesystem\File\Content;
use Innmind\Url\{
Url,
Expand All @@ -31,7 +34,7 @@
$dotenv->load($file);
}

$os = OSFactory::build();
$os = Resilient::of(OSFactory::build());
$bucket = Factory::of($os)->build(
Url::of(\getenv('S3_URL') ?? throw new Exception('Env var missing')),
Region::of(\getenv('S3_REGION') ?? throw new Exception('Env var missing')),
Expand Down

0 comments on commit f9d9dba

Please sign in to comment.