Skip to content

Commit

Permalink
🔧 add configuration option for year-in-review per scheduler (#3062)
Browse files Browse the repository at this point in the history
Co-authored-by: Kris <[email protected]>
Co-authored-by: Chris <[email protected]>
  • Loading branch information
3 people authored Dec 27, 2024
1 parent 80c6eb0 commit 7b64c74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ MIX_LEGAL_TEL="01234 / 56789"
# Should the year in review be visible to the users?
YEAR_IN_REVIEW_BACKEND=false
YEAR_IN_REVIEW_ALERT=false
YEAR_IN_REVIEW_SCHEDULER=false # Should the scheduler calculate the year in review for all users daily? If deactivated, it will be calculated upon request.

# Telegram Bot credentials - used for admin notifications
TELEGRAM_ADMIN_ACTIVE=false # Set to true to enable Telegram notifications
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function schedule(Schedule $schedule): void {
//weekly tasks
$schedule->command(MastodonServers::class)->weekly();

if (config('trwl.year_in_review.backend')) {
if (config('trwl.year_in_review.scheduler')) {
$schedule->command(CacheYearInReview::class)->withoutOverlapping()->dailyAt('2:00');
}
}
Expand Down
5 changes: 3 additions & 2 deletions config/trwl.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@
'hafas' => env('HAFAS_CACHE', false),
],
'year_in_review' => [
'alert' => env('YEAR_IN_REVIEW_ALERT', false),
'backend' => env('YEAR_IN_REVIEW_BACKEND', false),
'alert' => env('YEAR_IN_REVIEW_ALERT', false),
'backend' => env('YEAR_IN_REVIEW_BACKEND', false),
'scheduler' => env('YEAR_IN_REVIEW_SCHEDULER', false),
],
'webhooks_active' => env('WEBHOOKS_ACTIVE', false),
'webfinger_active' => env('WEBFINGER_ACTIVE', false),
Expand Down

0 comments on commit 7b64c74

Please sign in to comment.