mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Rename InterruptedError => QueryInterrupted, closes #490
This commit is contained in:
parent
edb36629e7
commit
bd4dbc8519
7 changed files with 20 additions and 20 deletions
|
|
@ -14,7 +14,7 @@ from sanic.views import HTTPMethodView
|
|||
from datasette import __version__
|
||||
from datasette.plugins import pm
|
||||
from datasette.utils import (
|
||||
InterruptedError,
|
||||
QueryInterrupted,
|
||||
InvalidSql,
|
||||
LimitedWriter,
|
||||
format_bytes,
|
||||
|
|
@ -368,7 +368,7 @@ class BaseView(RenderMixin):
|
|||
|
||||
else:
|
||||
data, extra_template_data, templates = response_or_template_contexts
|
||||
except InterruptedError:
|
||||
except QueryInterrupted:
|
||||
raise DatasetteError(
|
||||
"""
|
||||
SQL query took too long. The time limit is controlled by the
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from sanic.request import RequestParameters
|
|||
from datasette.plugins import pm
|
||||
from datasette.utils import (
|
||||
CustomRow,
|
||||
InterruptedError,
|
||||
QueryInterrupted,
|
||||
append_querystring,
|
||||
compound_keys_after_sql,
|
||||
escape_sqlite,
|
||||
|
|
@ -527,7 +527,7 @@ class TableView(RowTableShared):
|
|||
await self.ds.execute(database, count_sql, from_sql_params)
|
||||
)
|
||||
filtered_table_rows_count = count_rows[0][0]
|
||||
except InterruptedError:
|
||||
except QueryInterrupted:
|
||||
pass
|
||||
|
||||
# facets support
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue