Opcion de enviar update a los servicios externos

This commit is contained in:
Juan Pablo Vial
2025-05-16 19:14:20 -04:00
parent 105179b4ed
commit b7c5e4ebc3
9 changed files with 44 additions and 8 deletions

View File

@ -24,7 +24,7 @@ class External extends Ideal\Service
return $this;
}
public function check(): bool
public function check(bool $update = false): bool
{
$errors = [];
foreach ($this->externalServices as $externalService) {
@ -36,6 +36,9 @@ class External extends Ideal\Service
'service' => get_class($externalService),
'action' => 'check',
];
if ($update) {
$queueData['args'] = ['update' => true];
}
if (!$this->queueService->enqueue($queueData)) {
$errors []= get_class($externalService);
}