mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Co-authored-by: Aditya Tripathi <aditya@climactic.co>
33 lines
1002 B
PHP
33 lines
1002 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Services\ImageScan\ResourceScans;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
/**
|
|
* Writes the summaries of the current scans of every resource of a team again, with their stored security status, after
|
|
* a team-wide ignore was added or removed, a team-wide ignore ended, or the upgrade to security statuses, so the status
|
|
* in sidebars, markers, and lists matches the findings.
|
|
*/
|
|
class RefreshImageScanSummariesJob implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
public $tries = 1;
|
|
|
|
public function __construct(public int $teamId)
|
|
{
|
|
$this->onQueue(isCloud() ? maintenance_queue() : 'default');
|
|
}
|
|
|
|
public function handle(): void
|
|
{
|
|
ResourceScans::refreshSummaries(ResourceScans::currentForTeam($this->teamId));
|
|
}
|
|
}
|