fix
This commit is contained in:
parent
eab3b65629
commit
2d1c6a5402
1 changed files with 3 additions and 3 deletions
|
@ -159,7 +159,7 @@ class AIOSQLite:
|
||||||
await self.read_ready.wait()
|
await self.read_ready.wait()
|
||||||
still_waiting = True
|
still_waiting = True
|
||||||
if self._closing:
|
if self._closing:
|
||||||
raise asyncio.CancelledError
|
raise asyncio.CancelledError()
|
||||||
return await asyncio.get_event_loop().run_in_executor(
|
return await asyncio.get_event_loop().run_in_executor(
|
||||||
self.reader_executor, read_only_fn, sql, parameters
|
self.reader_executor, read_only_fn, sql, parameters
|
||||||
)
|
)
|
||||||
|
@ -203,7 +203,7 @@ class AIOSQLite:
|
||||||
try:
|
try:
|
||||||
async with self.write_lock:
|
async with self.write_lock:
|
||||||
if self._closing:
|
if self._closing:
|
||||||
raise asyncio.CancelledError
|
raise asyncio.CancelledError()
|
||||||
return await asyncio.get_event_loop().run_in_executor(
|
return await asyncio.get_event_loop().run_in_executor(
|
||||||
self.writer_executor, lambda: self.__run_transaction(fun, *args, **kwargs)
|
self.writer_executor, lambda: self.__run_transaction(fun, *args, **kwargs)
|
||||||
)
|
)
|
||||||
|
@ -240,7 +240,7 @@ class AIOSQLite:
|
||||||
try:
|
try:
|
||||||
async with self.write_lock:
|
async with self.write_lock:
|
||||||
if self._closing:
|
if self._closing:
|
||||||
raise asyncio.CancelledError
|
raise asyncio.CancelledError()
|
||||||
return await asyncio.get_event_loop().run_in_executor(
|
return await asyncio.get_event_loop().run_in_executor(
|
||||||
self.writer_executor, self.__run_transaction_with_foreign_keys_disabled, fun, args, kwargs
|
self.writer_executor, self.__run_transaction_with_foreign_keys_disabled, fun, args, kwargs
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue