mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-07-04 17:01:54 +02:00
Use Lutim namespace for commands
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user