mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
8201fea9ef
Adds Executor\Exception\Timeout (with timeoutSeconds) and translates it at each call site into BUILD_TIMEOUT, FUNCTION_SYNCHRONOUS_TIMEOUT, or FUNCTION_ASYNCHRONOUS_TIMEOUT instead of always using the misleading sync function error. Build timeouts now append to streamed buildLogs rather than replacing them, and the build worker reports its timeout via Span.
24 lines
445 B
PHP
24 lines
445 B
PHP
<?php
|
|
|
|
namespace Executor\Exception;
|
|
|
|
use Executor\Exception;
|
|
use Throwable;
|
|
|
|
class Timeout extends Exception
|
|
{
|
|
public function __construct(
|
|
string $message,
|
|
private readonly int $timeoutSeconds,
|
|
int $code = 0,
|
|
?Throwable $previous = null,
|
|
) {
|
|
parent::__construct($message, $code, $previous);
|
|
}
|
|
|
|
public function getTimeoutSeconds(): int
|
|
{
|
|
return $this->timeoutSeconds;
|
|
}
|
|
}
|