small fixes

This commit is contained in:
Doar Mihai
2026-04-04 18:52:19 +03:00
parent 7c09846bd6
commit feb964f3f6
16 changed files with 717 additions and 14 deletions
+49 -10
View File
@@ -16,20 +16,59 @@ return Application::configure(basePath: dirname(__DIR__))
//
})
->withSchedule(function (Schedule $schedule): void {
// Fetch jobs from all sources hourly
$schedule->command('jobs:fetch --limit=100')
->hourly()
// =========================================================================
// Job Fetching - Fetch fresh jobs from external APIs
// =========================================================================
// Fetch jobs every 2 hours to keep listings fresh
// Limit per source to avoid rate limits and keep queue manageable
$schedule->command('jobs:fetch --limit=50')
->everyTwoHours()
->withoutOverlapping()
->onOneServer();
->onOneServer()
->runInBackground();
// Clean up old jobs daily at 2 AM
$schedule->command('jobs:clean --days=30')
->dailyAt('02:00')
->onOneServer();
// =========================================================================
// Job Enrichment - Auto-categorize and enhance job data
// =========================================================================
// Deduplicate jobs weekly on Sunday at 3 AM
// Enrich new jobs every 6 hours (categorization, experience level detection)
// This runs after jobs have been fetched to categorize uncategorized jobs
$schedule->command('jobs:enrich')
->everySixHours()
->withoutOverlapping()
->onOneServer()
->runInBackground();
// =========================================================================
// Job Deduplication - Remove duplicate job listings
// =========================================================================
// Deduplicate jobs daily at 3 AM (after fetch cycles have completed)
// Daily is better than weekly to keep listings clean
$schedule->command('jobs:deduplicate')
->weeklyOn(0, '03:00')
->dailyAt('03:00')
->onOneServer()
->runInBackground();
// =========================================================================
// Job Cleanup - Remove expired and old jobs
// =========================================================================
// Clean up expired and old jobs daily at 2 AM
// Keeps database lean and removes stale listings
$schedule->command('jobs:clean --days=45')
->dailyAt('02:00')
->onOneServer()
->runInBackground();
// =========================================================================
// Cache Management - Keep caches fresh
// =========================================================================
// Prune stale cache tags hourly
$schedule->command('cache:prune-stale-tags')
->hourly()
->onOneServer();
})
->withExceptions(function (Exceptions $exceptions): void {