Created role for Minion Jobs to make dev easier

This commit is contained in:
Thomas Bloor 2018-03-21 17:14:51 +00:00
parent c0375dcd41
commit 30c210200f
4 changed files with 29 additions and 6 deletions

View file

@ -0,0 +1,12 @@
package Pear::LocalLoop::Plugin::Minion::Job::leaderboards_recalc;
use Mojo::Base 'Pear::LocalLoop::Plugin::Minion::Job';
sub run {
my ( $self, @args ) = @_;
my $leaderboard_rs = $self->app->schema->resultset('Leaderboard');
$leaderboard_rs->recalculate_all;
}
1;