small fixes
This commit is contained in:
+49
-10
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user