Initial commit: Pireon Admin — headless admin panel and public API
Laravel 13 + Filament 5 admin panel and REST API for a non-profit developer collective, backed by the Pireon OAuth identity server. The public site is a separate, server-rendered application consuming /api/public/v1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
46
routes/console.php
Normal file
46
routes/console.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Support\Facades\Schedule;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Scheduled tasks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Keeping repository stats fresh is what stops the public site from looking
|
||||
| abandoned, which is the main risk for a site like this. `withoutOverlapping`
|
||||
| guards against a slow run colliding with the next tick.
|
||||
|
|
||||
*/
|
||||
|
||||
/*
|
||||
* Publication windows are enforced by the `published` scopes, so content
|
||||
* appears and disappears on time whether or not this runs. What it does is
|
||||
* keep the stored state honest — a call the site stopped offering weeks ago
|
||||
* should not still say "Open" in the panel.
|
||||
*/
|
||||
Schedule::command('content:schedule')
|
||||
->everyFiveMinutes()
|
||||
->withoutOverlapping()
|
||||
->runInBackground();
|
||||
|
||||
/*
|
||||
* Safety net for image processing. Uploads queue their own work, but a worker
|
||||
* that is down would otherwise leave images without dimensions indefinitely —
|
||||
* and the symptom, a page that reflows as it loads, is easy to miss.
|
||||
*/
|
||||
Schedule::command('media:process')
|
||||
->everyTenMinutes()
|
||||
->withoutOverlapping()
|
||||
->runInBackground();
|
||||
|
||||
Schedule::command('repos:sync')
|
||||
->cron(match ($cron = (string) config('git.sync_cron', 'hourly')) {
|
||||
'hourly' => '0 * * * *',
|
||||
'daily' => '0 4 * * *',
|
||||
default => $cron,
|
||||
})
|
||||
->withoutOverlapping()
|
||||
->runInBackground();
|
||||
Reference in New Issue
Block a user