mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
remove the hardcoded throw Timeout Exception;
This commit is contained in:
@@ -179,6 +179,9 @@ App::error()
|
||||
->inject('request')
|
||||
->inject('dbForProject')
|
||||
->action(function (App $utopia, throwable $error, Request $request, Database $dbForProject) {
|
||||
var_dump("App::error");
|
||||
var_dump("getCode=" . $error->getCode());
|
||||
var_dump($error->getMessage());
|
||||
if ($error instanceof Timeout) {
|
||||
var_dump("App::error() in in in in in in in in in in in in in");
|
||||
var_dump($request->getParams());
|
||||
@@ -2102,7 +2105,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
||||
}
|
||||
|
||||
$filterQueries = Query::groupByType($queries)['filters'];
|
||||
$timeoutMilliseconds = 200;
|
||||
$timeoutMilliseconds = 200; // todo: make this configurable
|
||||
|
||||
if ($documentSecurity && !$valid) {
|
||||
$documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, $timeoutMilliseconds);
|
||||
@@ -2112,8 +2115,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
||||
$total = Authorization::skip(fn () => $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $filterQueries, APP_LIMIT_COUNT));
|
||||
}
|
||||
|
||||
throw new Timeout('Timeout'); // Force Exception.....
|
||||
|
||||
/**
|
||||
* Reset $collection attribute to remove prefix.
|
||||
*/
|
||||
|
||||
@@ -995,11 +995,13 @@ trait DatabasesBase
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'queries' => ['orderAsc("releaseYear")', 'sleep(1)'],
|
||||
'queries' => ['sleep("$id", 1)'],
|
||||
]);
|
||||
die;
|
||||
|
||||
var_dump($documents);
|
||||
|
||||
die;
|
||||
|
||||
$documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
|
||||
Reference in New Issue
Block a user