]> iEval git - gruntmaster-data.git/blame_incremental - lib/Gruntmaster/App/Command/Rerun.pm
Make perlcritic happy
[gruntmaster-data.git] / lib / Gruntmaster / App / Command / Rerun.pm
... / ...
CommitLineData
1package Gruntmaster::App::Command::Rerun;
2
3use 5.014000;
4use warnings;
5
6our $VERSION = '5999.000_004';
7
8use Gruntmaster::App '-command';
9use Gruntmaster::Data;
10
11sub usage_desc { '%c rerun id' }
12
13sub validate_args {
14 my ($self, $opt, $args) = @_;
15 my @args = @$args;
16 $self->usage_error('This command only works on jobs') if $self->app->table && $self->app->table ne 'jobs';
17 $self->usage_error('Wrong number of arguments') if @args != 1;
18}
19
20sub execute {
21 my ($self, $opt, $args) = @_;
22 my ($obj) = @$args;
23 rerun_job $obj;
24}
25
261;
27__END__
28
29=encoding utf-8
30
31=head1 NAME
32
33Gruntmaster::App::Command::Rerun - rerun a job
34
35=head1 SYNOPSIS
36
37 gm rerun 123
38
39=head1 DESCRIPTION
40
41The rerun command takes the ID of a job, clears its result, and makes
42B<gruntmaster-daemon> rerun it.
43
44=head1 SEE ALSO
45
46L<gm>
47
48=head1 AUTHOR
49
50Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
51
52=head1 COPYRIGHT AND LICENSE
53
54Copyright (C) 2015 by Marius Gavrilescu
55
56This library is free software; you can redistribute it and/or modify
57it under the same terms as Perl itself, either Perl version 5.20.1 or,
58at your option, any later version of Perl 5 you may have available.
59
60
61=cut
This page took 0.022178 seconds and 4 git commands to generate.