28 lines
482 B
Perl
28 lines
482 B
Perl
package Pear::LocalLoop::Command::recalc_leaderboards;
|
|
use Mojo::Base 'Mojolicious::Command';
|
|
|
|
use Mojo::Util 'getopt';
|
|
|
|
has description => 'Build All leaderboards';
|
|
|
|
has usage => sub { shift->extract_usage };
|
|
|
|
sub run {
|
|
my ( $self, @args ) = @_;
|
|
|
|
my $leaderboard_rs = $self->app->schema->resultset('Leaderboard');
|
|
|
|
$leaderboard_rs->recalculate_all;
|
|
|
|
return 1;
|
|
}
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
Usage: APPLICATION recalc_leaderboards
|
|
|
|
Recalculates ALL leaderboards.
|
|
|
|
=cut
|
|
|
|
1;
|