Implement VM provision locking mechanism and enhance VM job handling
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user