This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Foodloop-Server/lib/Pear/LocalLoop/Command/recalc_leaderboards.pm

27 lines
461 B
Perl
Raw Permalink Normal View History

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;
}
=head1 SYNOPSIS
Usage: APPLICATION recalc_leaderboards
Recalculates ALL leaderboards.
=cut
1;