line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# mt-aws-glacier - Amazon Glacier sync client |
2
|
|
|
|
|
|
|
# Copyright (C) 2012-2014 Victor Efimov |
3
|
|
|
|
|
|
|
# http://mt-aws.com (also http://vs-dev.com) vs@vs-dev.com |
4
|
|
|
|
|
|
|
# License: GPLv3 |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This file is part of "mt-aws-glacier" |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# mt-aws-glacier is free software: you can redistribute it and/or modify |
9
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by |
10
|
|
|
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or |
11
|
|
|
|
|
|
|
# (at your option) any later version. |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# mt-aws-glacier is distributed in the hope that it will be useful, |
14
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
|
|
|
|
|
|
|
# GNU General Public License for more details. |
17
|
|
|
|
|
|
|
# |
18
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License |
19
|
|
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package App::MtAws::QueueJob::Verify; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $VERSION = '1.114_2'; |
24
|
|
|
|
|
|
|
|
25
|
4
|
|
|
4
|
|
1837
|
use strict; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
112
|
|
26
|
4
|
|
|
4
|
|
17
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
99
|
|
27
|
4
|
|
|
4
|
|
16
|
use Carp; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
194
|
|
28
|
|
|
|
|
|
|
|
29
|
4
|
|
|
4
|
|
18
|
use App::MtAws::QueueJobResult; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
258
|
|
30
|
4
|
|
|
4
|
|
17
|
use base 'App::MtAws::QueueJob'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
1347
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub init |
33
|
|
|
|
|
|
|
{ |
34
|
16
|
|
|
16
|
0
|
18
|
my ($self) = @_; |
35
|
16
|
100
|
|
|
|
115
|
defined($self->{filename}) || confess "no filename"; |
36
|
15
|
100
|
|
|
|
109
|
defined($self->{relfilename}) || confess "no relfilename"; |
37
|
14
|
100
|
|
|
|
186
|
$self->{treehash}||confess; |
38
|
13
|
|
|
|
|
37
|
$self->enter('verify'); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub on_verify |
42
|
|
|
|
|
|
|
{ |
43
|
10
|
|
|
10
|
0
|
12
|
my ($self) = @_; |
44
|
30
|
|
|
|
|
124
|
return state "wait", task "verify_file", { map { $_ => $self->{$_} } qw/filename relfilename treehash/ } => sub { |
45
|
10
|
|
|
10
|
|
20
|
my ($args) = @_; |
46
|
10
|
50
|
|
|
|
44
|
defined($self->{match} = $args->{match}) or confess; |
47
|
10
|
|
|
|
|
39
|
state("done") |
48
|
|
|
|
|
|
|
} |
49
|
10
|
|
|
|
|
38
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |