Use Lutim namespace for commands

This commit is contained in:
Luc Didry
2014-06-03 21:41:30 +02:00
parent 277053d2a8
commit f044c1e953
6 changed files with 13 additions and 11 deletions
+2
View File
@@ -10,6 +10,8 @@ mkdir($ENV{MOJO_TMPDIR}, 0700) unless (-d $ENV{MOJO_TMPDIR});
sub startup {
my $self = shift;
push @{$self->commands->namespaces}, 'Lutim::Command';
$self->{wait_for_it} = {};
$self->plugin('I18N');
@@ -1,4 +1,4 @@
package Mojolicious::Command::cron;
package Lutim::Command::cron;
use Mojo::Base 'Mojolicious::Commands';
has description => 'Execute tasks.';
@@ -7,7 +7,7 @@ has hint => <<EOF;
See 'script/lutim cron help TASK' for more information on a specific task.
EOF
has message => sub { shift->extract_usage . "\nCron tasks:\n" };
has namespaces => sub { ['Mojolicious::Command::cron'] };
has namespaces => sub { ['Lutim::Command::cron'] };
sub help { shift->run(@_) }
@@ -17,7 +17,7 @@ sub help { shift->run(@_) }
=head1 NAME
Mojolicious::Command::cron - Cron commands
Lutim::Command::cron - Cron commands
=head1 SYNOPSIS
@@ -1,4 +1,4 @@
package Mojolicious::Command::cron::cleanbdd;
package Lutim::Command::cron::cleanbdd;
use Mojo::Base 'Mojolicious::Command';
use LutimModel;
use Mojo::Util qw(slurp decode);
@@ -28,7 +28,7 @@ sub run {
=head1 NAME
Mojolicious::Command::cron::cleanbdd - Delete IP addresses from database after configured delay
Lutim::Command::cron::cleanbdd - Delete IP addresses from database after configured delay
=head1 SYNOPSIS
@@ -1,4 +1,4 @@
package Mojolicious::Command::cron::cleanfiles;
package Lutim::Command::cron::cleanfiles;
use Mojo::Base 'Mojolicious::Command';
use LutimModel;
use Mojo::Util qw(slurp decode);
@@ -32,7 +32,7 @@ sub run {
=head1 NAME
Mojolicious::Command::cron::cleanfiles - Delete expired files
Lutim::Command::cron::cleanfiles - Delete expired files
=head1 SYNOPSIS
@@ -1,4 +1,4 @@
package Mojolicious::Command::cron::stats;
package Lutim::Command::cron::stats;
use Mojo::Base 'Mojolicious::Command';
use LutimModel;
use Mojo::DOM;
@@ -55,7 +55,7 @@ sub run {
=head1 NAME
Mojolicious::Command::cron::stats - Stats generator
Lutim::Command::cron::stats - Stats generator
=head1 SYNOPSIS
@@ -1,4 +1,4 @@
package Mojolicious::Command::cron::watch;
package Lutim::Command::cron::watch;
use Mojo::Base 'Mojolicious::Command';
use Mojo::Util qw(slurp decode);
use Filesys::DiskUsage qw/du/;
@@ -56,7 +56,7 @@ sub run {
=head1 NAME
Mojolicious::Command::cron::watch - Delete IP addresses from database after configured delay
Lutim::Command::cron::watch - Delete IP addresses from database after configured delay
=head1 SYNOPSIS