mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-13 23:56:47 +00:00
⚙️ Update PublishUnpublishedItems to run hourly and only publish MeetupEvents starting within the next 7 days.
This commit is contained in:
@@ -53,6 +53,7 @@ class PublishUnpublishedItems extends Command
|
|||||||
'MeetupEvent' => $modelClass::with('meetup.city.country')
|
'MeetupEvent' => $modelClass::with('meetup.city.country')
|
||||||
->whereNull('nostr_status')
|
->whereNull('nostr_status')
|
||||||
->where('start', '>', now())
|
->where('start', '>', now())
|
||||||
|
->where('start', '<=', now()->addDays(7))
|
||||||
->orderByDesc('created_at'),
|
->orderByDesc('created_at'),
|
||||||
default => null,
|
default => null,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Schedule::command(CleanupLoginKeys::class)->everyFifteenMinutes();
|
|||||||
|
|
||||||
Schedule::command(PublishUnpublishedItems::class, [
|
Schedule::command(PublishUnpublishedItems::class, [
|
||||||
'--model' => 'MeetupEvent',
|
'--model' => 'MeetupEvent',
|
||||||
])->dailyAt('17:00');
|
])->hourly();
|
||||||
|
|
||||||
Schedule::command(PublishUnpublishedItems::class, [
|
Schedule::command(PublishUnpublishedItems::class, [
|
||||||
'--model' => 'Meetup',
|
'--model' => 'Meetup',
|
||||||
|
|||||||
Reference in New Issue
Block a user