From c6c524a87667b94f59b3a4e6d235b2924f3d5063 Mon Sep 17 00:00:00 2001 From: HolgerHatGarKeineNode Date: Tue, 9 Dec 2025 23:02:43 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Update=20PublishUnpublishe?= =?UTF-8?q?dItems=20to=20run=20hourly=20and=20only=20publish=20MeetupEvent?= =?UTF-8?q?s=20starting=20within=20the=20next=207=E2=80=AFdays.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/Nostr/PublishUnpublishedItems.php | 1 + routes/console.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/Nostr/PublishUnpublishedItems.php b/app/Console/Commands/Nostr/PublishUnpublishedItems.php index 46a6943..d80df79 100644 --- a/app/Console/Commands/Nostr/PublishUnpublishedItems.php +++ b/app/Console/Commands/Nostr/PublishUnpublishedItems.php @@ -53,6 +53,7 @@ class PublishUnpublishedItems extends Command 'MeetupEvent' => $modelClass::with('meetup.city.country') ->whereNull('nostr_status') ->where('start', '>', now()) + ->where('start', '<=', now()->addDays(7)) ->orderByDesc('created_at'), default => null, }; diff --git a/routes/console.php b/routes/console.php index faa9c7a..50e7617 100644 --- a/routes/console.php +++ b/routes/console.php @@ -7,7 +7,7 @@ Schedule::command(CleanupLoginKeys::class)->everyFifteenMinutes(); Schedule::command(PublishUnpublishedItems::class, [ '--model' => 'MeetupEvent', -])->dailyAt('17:00'); +])->hourly(); Schedule::command(PublishUnpublishedItems::class, [ '--model' => 'Meetup',