feat(vm): hoàn tiền khi cấp VM lỗi, theo dõi job queue, uuid dịch vụ cho ticket, chuẩn hoá RAM addon

- VmProvisionException/VmProvisionRefund xử lý lỗi cấp phát VM
- QueueJobInspector + QueueMonitorController xem chi tiết job
- Thêm service uuid cho ticket, thời lượng cho activity_logs
- Migration chuẩn hoá RAM addon sang MB, trạng thái deleting cho snapshot

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-30 11:54:05 +07:00
co-authored by Claude Sonnet 5.5
parent 7136bec265
commit 62596d9063
32 changed files with 514 additions and 107 deletions
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Support\QueueJobInspector;
use Illuminate\Http\JsonResponse;
use Laravel\Horizon\Contracts\JobRepository;
use Laravel\Horizon\Contracts\MetricsRepository;
@@ -71,6 +72,14 @@ class QueueMonitorController extends Controller
]);
}
public function show(string $id): JsonResponse
{
$job = $this->jobs->getJobs([$id])->first();
abort_if(!$job, 404, "Không tìm thấy job #{$id}");
return response()->json(['success' => true, 'data' => QueueJobInspector::describe($job)]);
}
/**
* POST /api/queue/jobs/failed/{id}/retry
* Re-queue a failed job by its Horizon job ID.