Files
pterodactyl-panel/app/Events/Server/OperationCompleted.php
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

26 lines
934 B
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Events\Server;
use Illuminate\Contracts\Events\ShouldDispatchAfterCommit;
use Pterodactyl\Events\Event;
/**
* Immutable operation result; listeners never depend on a model surviving in the queue.
* Only identifiers travel: after a `delete` the server row is already gone, so listeners
* that need more must have stored it under the server uuid beforehand. `resourceUuid` is
* the backup uuid for `backup` and the server uuid for every other operation.
*/
final class OperationCompleted extends Event implements ShouldDispatchAfterCommit
{
/** @param 'provision'|'install'|'reinstall'|'backup'|'delete'|'suspend'|'unsuspend'|'transfer' $operation */
public function __construct(
public readonly string $serverUuid,
public readonly string $operation,
public readonly bool $successful,
public readonly string $resourceUuid,
) {}
}