<?php
namespace App\Jobs;
use App\Domain\Blockchain\Contracts\BlockchainGateway;use App\Models\OperationsAlert;use Illuminate\Bus\Queueable;use Illuminate\Contracts\Queue\ShouldQueue;use Illuminate\Foundation\Bus\Dispatchable;use Illuminate\Queue\InteractsWithQueue;use Illuminate\Queue\SerializesModels;use Throwable;
final class ProviderHealthCheckJob implements ShouldQueue {use Dispatchable,InteractsWithQueue,Queueable,SerializesModels;public int $tries=3;public function __construct(){$this->onQueue('reconciliation');}public function backoff():array{return [10,30,90];}public function handle(BlockchainGateway $g):void{try{$g->validateAddress('tron','TJRabPrwbZy45sbavfcjinPJC18kjpRTv8');}catch(Throwable $e){OperationsAlert::create(['severity'=>'critical','code'=>'PROVIDER_HEALTH_FAILED','message'=>$e->getMessage(),'context'=>['provider'=>'tron']]);throw $e;}}}
