Implement VM provision locking mechanism and enhance VM job handling

This commit is contained in:
baodev0
2026-07-13 11:23:53 +07:00
parent 0976e23d1a
commit 8d3410f8cc
11 changed files with 143 additions and 131 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class VmProvisionLock extends Model
{
protected $fillable = ['customer_id', 'order_item_id', 'status'];
public static function isRunning(int $customerId): bool
{
return static::where('customer_id', $customerId)->where('status', 'running')->exists();
}
}