error handling
This commit is contained in:
parent
90dce16aea
commit
103df6436d
@ -4,13 +4,22 @@
|
||||
|
||||
use App\Services\Pacs\Sync\StudiesSync;
|
||||
use Closure;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
final readonly class ScanStudies
|
||||
{
|
||||
public function __invoke(StudiesSync $sync, Closure $next): StudiesSync
|
||||
{
|
||||
$study_ids = $sync->getClient()->getStudiesIds();
|
||||
$sync->setStudyIds($study_ids);
|
||||
$study_ids = [];
|
||||
try {
|
||||
$study_ids = $sync->getClient()->getStudiesIds();
|
||||
} catch (Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
if (! empty($study_ids)) {
|
||||
$sync->setStudyIds($study_ids);
|
||||
}
|
||||
|
||||
return $next($sync);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ public function run(): void
|
||||
);
|
||||
DicomServer::create(
|
||||
[
|
||||
'is_active' => true,
|
||||
'is_active' => false,
|
||||
'server_name' => 'San Jose',
|
||||
'geo_code' => 'US',
|
||||
'host' => 'san-jose.mylabctg.com',
|
||||
|
Loading…
Reference in New Issue
Block a user