2023-04-28 13:08:48 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Livewire;
|
|
|
|
|
2023-05-25 12:23:49 +00:00
|
|
|
use App\Jobs\InstanceAutoUpdateJob;
|
2023-05-25 20:33:47 +00:00
|
|
|
use App\Models\Server;
|
2023-04-28 13:08:48 +00:00
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
class ForceUpgrade extends Component
|
|
|
|
{
|
|
|
|
public function upgrade()
|
|
|
|
{
|
2023-05-25 20:33:47 +00:00
|
|
|
try {
|
|
|
|
$this->emit('updateInitiated');
|
2023-05-25 20:59:33 +00:00
|
|
|
dispatch(new InstanceAutoUpdateJob(force: true));
|
2023-05-25 20:33:47 +00:00
|
|
|
} catch (\Exception $e) {
|
|
|
|
return general_error_handler($e, $this);
|
|
|
|
}
|
2023-04-28 13:08:48 +00:00
|
|
|
}
|
|
|
|
}
|