Initial user stats recalculation #254
This commit is contained in:
36
app/Providers/CronServiceProvider.php
Normal file
36
app/Providers/CronServiceProvider.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Cron\Nightly\RecalculateStats;
|
||||
use App\Cron\Nightly\SetActiveFlights;
|
||||
use App\Events\CronMonthly;
|
||||
use App\Events\CronNightly;
|
||||
use App\Events\CronWeekly;
|
||||
use App\Cron\Nightly\ApplyExpenses;
|
||||
use App\Cron\Nightly\PilotLeave;
|
||||
use App\Cron\Nightly\RecalculateBalances;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
class CronServiceProvider extends ServiceProvider
|
||||
{
|
||||
protected $listen = [
|
||||
# Cron hooks
|
||||
CronNightly::class => [
|
||||
ApplyExpenses::class,
|
||||
RecalculateBalances::class,
|
||||
PilotLeave::class,
|
||||
SetActiveFlights::class,
|
||||
RecalculateStats::class,
|
||||
],
|
||||
|
||||
CronWeekly::class => [
|
||||
],
|
||||
|
||||
CronMonthly::class => [
|
||||
\App\Cron\Monthly\ApplyExpenses::class
|
||||
],
|
||||
];
|
||||
|
||||
protected $subscribe = [];
|
||||
}
|
||||
@@ -2,16 +2,9 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Cron\Nightly\SetActiveFlights;
|
||||
use App\Events\CronMonthly;
|
||||
use App\Events\CronNightly;
|
||||
use App\Events\CronWeekly;
|
||||
use App\Events\Expenses;
|
||||
use App\Events\UserStatsChanged;
|
||||
use App\Listeners\AwardListener;
|
||||
use App\Cron\Nightly\ApplyExpenses;
|
||||
use App\Cron\Nightly\PilotLeave;
|
||||
use App\Cron\Nightly\RecalculateBalances;
|
||||
use App\Listeners\ExpenseListener;
|
||||
use App\Listeners\FinanceEvents;
|
||||
use App\Listeners\NotificationEvents;
|
||||
@@ -20,26 +13,10 @@ use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvi
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
protected $listen = [
|
||||
|
||||
Expenses::class => [
|
||||
Expenses::class => [
|
||||
ExpenseListener::class
|
||||
],
|
||||
|
||||
# Cron hooks
|
||||
CronNightly::class => [
|
||||
ApplyExpenses::class,
|
||||
RecalculateBalances::class,
|
||||
PilotLeave::class,
|
||||
SetActiveFlights::class,
|
||||
],
|
||||
|
||||
CronWeekly::class => [
|
||||
],
|
||||
|
||||
CronMonthly::class => [
|
||||
\App\Cron\Monthly\ApplyExpenses::class
|
||||
],
|
||||
|
||||
UserStatsChanged::class => [
|
||||
AwardListener::class,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user