Skip to content

Commit

Permalink
Fix out of memory on Status page when there are many background jobs -
Browse files Browse the repository at this point in the history
…closes #4197
  • Loading branch information
freescout-help-desk committed Aug 27, 2024
1 parent 39824c8 commit 23bb50e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/SystemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public function status(Request $request)
$env_is_writable = is_writable(base_path('.env'));

// Jobs
$queued_jobs = \App\Job::orderBy('created_at', 'desc')->get();
$failed_jobs = \App\FailedJob::orderBy('failed_at', 'desc')->get();
$queued_jobs = \App\Job::orderBy('created_at', 'desc')->limit(100)->get();
$failed_jobs = \App\FailedJob::orderBy('failed_at', 'desc')->limit(100)->get();
$failed_queues = $failed_jobs->pluck('queue')->unique();

// Commands
Expand Down

0 comments on commit 23bb50e

Please sign in to comment.