mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 01:47:57 +00:00
fix potential cancelling race with full queue
This commit is contained in:
@@ -38,6 +38,7 @@ class QueryPool:
|
||||
""" Schedule a query for execution.
|
||||
"""
|
||||
if self.is_cancelled:
|
||||
self.clear_queue()
|
||||
await self.finish()
|
||||
return
|
||||
|
||||
@@ -47,6 +48,7 @@ class QueryPool:
|
||||
await asyncio.sleep(0)
|
||||
|
||||
if self.is_cancelled:
|
||||
self.clear_queue()
|
||||
await self.finish()
|
||||
|
||||
async def finish(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user