forked from lix-project/hydra
Delay initializing the s3 client until it's needed to silence warnings
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
77dbf55abb
commit
98c9559bf2
|
@ -14,7 +14,7 @@ use Nix::Store;
|
||||||
use Hydra::Model::DB;
|
use Hydra::Model::DB;
|
||||||
use Hydra::Helper::CatalystUtils;
|
use Hydra::Helper::CatalystUtils;
|
||||||
|
|
||||||
my $client = Net::Amazon::S3::Client->new( s3 => Net::Amazon::S3->new( retry => 1 ) );
|
my $client;
|
||||||
my %compressors = (
|
my %compressors = (
|
||||||
xz => "| $Nix::Config::xz",
|
xz => "| $Nix::Config::xz",
|
||||||
bzip2 => "| $Nix::Config::bzip2",
|
bzip2 => "| $Nix::Config::bzip2",
|
||||||
|
@ -39,6 +39,9 @@ sub buildFinished {
|
||||||
}
|
}
|
||||||
|
|
||||||
return unless @matching_configs;
|
return unless @matching_configs;
|
||||||
|
unless (defined $client) {
|
||||||
|
$client = Net::Amazon::S3::Client->new( s3 => Net::Amazon::S3->new( retry => 1 ) );
|
||||||
|
}
|
||||||
|
|
||||||
# !!! Maybe should do per-bucket locking?
|
# !!! Maybe should do per-bucket locking?
|
||||||
my $lockhandle = IO::File->new;
|
my $lockhandle = IO::File->new;
|
||||||
|
|
Loading…
Reference in a new issue