The export functionality uses Laravel's queue system to process export jobs asynchronously. All exports are automatically queued when saved and processed in a dedicated exports queue.
To process export jobs, you need to run the queue worker specifically for the exports queue:
php artisan queue:work --queue=exportsOr process all queues (including exports):
php artisan queue:workFor production, you should use a process monitor like:
Option 1: Supervisor (Linux)
sudo apt-get install supervisorOption 2: PM2 (Cross-platform)
npm install -g pm2
pm2 start "php artisan queue:work --queue=exports" --name export-worker
pm2 save
pm2 startupOption 3: Windows Service Use NSSM (Non-Sucking Service Manager) to run the queue worker as a Windows service.
# Process only export jobs
php artisan queue:work --queue=exports
# Process jobs with verbose output
php artisan queue:work --queue=exports --verbose
# Process all queues
php artisan queue:work
# Stop after processing all jobs
php artisan queue:work --queue=exports --stop-when-empty
# Restart worker every hour
php artisan queue:work --queue=exports --max-time=3600
# Restart worker after 100 jobs
php artisan queue:work --queue=exports --max-jobs=100
# Run in daemon mode (production)
php artisan queue:work --queue=exports --daemonYou can monitor export jobs in the admin panel at /admin/exports
- pending: Waiting to be processed
- in_progress: Currently being processed
- completed: Successfully completed
- failed: Processing failed
The export system is fully automated:
-
Create an export → Fill in the form with service, user ID, video ID, aspect ratio, resolution, and outro preference.
-
Save → Click "Save" - the export is automatically queued to the
exportsqueue withpendingstatus. -
Job Processing:
- Status changes from
pendingtoin_progress - Runs the
goexport_clicommand with your parameters - Updates to
completedwith file path on success - Updates to
failedon error - All status changes tracked in the database
- Status changes from
-
Monitor Progress:
- View current status in the exports table
- Check file path when completed
- View/edit exports at any time
- Make sure queue worker is running for exports:
php artisan queue:work --queue=exports - Check if the queue worker is running at all:
php artisan queue:work - Check failed jobs:
php artisan queue:failed - Check logs:
storage/logs/laravel.log - Look at the jobs table in database to see pending jobs
# Check database jobs table
php artisan db:table jobsphp artisan queue:retry allphp artisan queue:flushphp artisan queue:restart- Automatic Queuing: All exports are automatically queued when saved - there's no manual "process" step
- Dedicated Queue: Exports use their own
exportsqueue, separate from other application jobs - Status Tracking: Export status is automatically managed (pending → in_progress → completed/failed)
- Database Storage: Queue jobs are stored in the
jobstable, export results in theexportstable