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::CreateVault; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $VERSION = '1.114_2'; |
24
|
|
|
|
|
|
|
|
25
|
6
|
|
|
6
|
|
511
|
use strict; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
152
|
|
26
|
6
|
|
|
6
|
|
25
|
use warnings; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
145
|
|
27
|
6
|
|
|
6
|
|
24
|
use Carp; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
280
|
|
28
|
|
|
|
|
|
|
|
29
|
6
|
|
|
6
|
|
26
|
use App::MtAws::QueueJobResult; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
328
|
|
30
|
6
|
|
|
6
|
|
56
|
use base 'App::MtAws::QueueJob'; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
2726
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub init |
33
|
|
|
|
|
|
|
{ |
34
|
5
|
|
|
5
|
0
|
8
|
my ($self) = @_; |
35
|
5
|
100
|
|
|
|
263
|
defined($self->{name}) || confess "no vault"; |
36
|
4
|
|
|
|
|
16
|
$self->enter('create'); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub on_create |
40
|
|
|
|
|
|
|
{ |
41
|
2
|
|
|
2
|
0
|
3
|
my ($self) = @_; |
42
|
|
|
|
|
|
|
return state "wait", task "create_vault_job", { name => $self->{name} } => sub { |
43
|
2
|
|
|
2
|
|
8
|
state("done") |
44
|
|
|
|
|
|
|
} |
45
|
2
|
|
|
|
|
10
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |