From e8c34ce1b55491e593b4810475d58c6acadb3aaf Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sun, 13 Mar 2022 23:22:24 +0100 Subject: [PATCH] Fix typo --- MYMETA.json | 4 ++-- MYMETA.yml | 2 +- lib/Simba/CA.pm | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/MYMETA.json b/MYMETA.json index 5aa209e..d0e7d4e 100644 --- a/MYMETA.json +++ b/MYMETA.json @@ -4,7 +4,7 @@ "unknown" ], "dynamic_config" : 0, - "generated_by" : "Module::Build version 0.4231", + "generated_by" : "Module::Build version 0.4224", "license" : [ "perl_5" ], @@ -50,5 +50,5 @@ ] }, "version" : "0.002", - "x_serialization_backend" : "JSON::PP version 4.02" + "x_serialization_backend" : "JSON::PP version 2.97001" } diff --git a/MYMETA.yml b/MYMETA.yml index 535eaf3..d507fb5 100644 --- a/MYMETA.yml +++ b/MYMETA.yml @@ -4,7 +4,7 @@ author: - unknown build_requires: {} 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 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html diff --git a/lib/Simba/CA.pm b/lib/Simba/CA.pm index cd159ac..956cefc 100644 --- a/lib/Simba/CA.pm +++ b/lib/Simba/CA.pm @@ -294,10 +294,11 @@ sub reserve_fileset { my ($self, $target) = @_; my $start = time(); + my $pid; while (time() - $start < 3600) { my $rows = $self->{dbh}->do(q{update filesets set pid=? where id = ? and pid is null}, {}, $$, $target->{id}); 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"); if (!kill(0, $pid) && $!{ESRCH}) { $self->log(3, "pid $pid doesn't exist, trying to release fileset $target->{id}"); @@ -305,7 +306,7 @@ sub reserve_fileset { } 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; }