Fix typo
This commit is contained in:
parent
7180c24cc3
commit
e8c34ce1b5
|
@ -4,7 +4,7 @@
|
||||||
"unknown"
|
"unknown"
|
||||||
],
|
],
|
||||||
"dynamic_config" : 0,
|
"dynamic_config" : 0,
|
||||||
"generated_by" : "Module::Build version 0.4231",
|
"generated_by" : "Module::Build version 0.4224",
|
||||||
"license" : [
|
"license" : [
|
||||||
"perl_5"
|
"perl_5"
|
||||||
],
|
],
|
||||||
|
@ -50,5 +50,5 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"version" : "0.002",
|
"version" : "0.002",
|
||||||
"x_serialization_backend" : "JSON::PP version 4.02"
|
"x_serialization_backend" : "JSON::PP version 2.97001"
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ author:
|
||||||
- unknown
|
- unknown
|
||||||
build_requires: {}
|
build_requires: {}
|
||||||
dynamic_config: 0
|
dynamic_config: 0
|
||||||
generated_by: 'Module::Build version 0.4231, CPAN::Meta::Converter version 2.150010'
|
generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 2.150010'
|
||||||
license: perl
|
license: perl
|
||||||
meta-spec:
|
meta-spec:
|
||||||
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
||||||
|
|
|
@ -294,10 +294,11 @@ sub reserve_fileset {
|
||||||
my ($self, $target) = @_;
|
my ($self, $target) = @_;
|
||||||
|
|
||||||
my $start = time();
|
my $start = time();
|
||||||
|
my $pid;
|
||||||
while (time() - $start < 3600) {
|
while (time() - $start < 3600) {
|
||||||
my $rows = $self->{dbh}->do(q{update filesets set pid=? where id = ? and pid is null}, {}, $$, $target->{id});
|
my $rows = $self->{dbh}->do(q{update filesets set pid=? where id = ? and pid is null}, {}, $$, $target->{id});
|
||||||
return 1 if $rows == 1;
|
return 1 if $rows == 1;
|
||||||
my $pid = $self->{dbh}->selectrow_array(q{select pid from filesets where id = ?}, {}, $target->{id});
|
$pid = $self->{dbh}->selectrow_array(q{select pid from filesets where id = ?}, {}, $target->{id});
|
||||||
$self->log(3, "fileset $target->{id} appears to be in use by pid $pid");
|
$self->log(3, "fileset $target->{id} appears to be in use by pid $pid");
|
||||||
if (!kill(0, $pid) && $!{ESRCH}) {
|
if (!kill(0, $pid) && $!{ESRCH}) {
|
||||||
$self->log(3, "pid $pid doesn't exist, trying to release fileset $target->{id}");
|
$self->log(3, "pid $pid doesn't exist, trying to release fileset $target->{id}");
|
||||||
|
@ -305,7 +306,7 @@ sub reserve_fileset {
|
||||||
}
|
}
|
||||||
sleep 60;
|
sleep 60;
|
||||||
}
|
}
|
||||||
$self->log(2, "fileset $target->{id} appears to be still in use by pid $pid after grace perion - giving up");
|
$self->log(2, "fileset $target->{id} appears to be still in use by pid $pid after grace period - giving up");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue