|
@ -32,6 +32,8 @@ import threading |
|
|
from typing import Dict, Optional, Tuple, Iterable |
|
|
from typing import Dict, Optional, Tuple, Iterable |
|
|
from base64 import b64decode, b64encode |
|
|
from base64 import b64decode, b64encode |
|
|
from collections import defaultdict |
|
|
from collections import defaultdict |
|
|
|
|
|
import concurrent |
|
|
|
|
|
from concurrent import futures |
|
|
|
|
|
|
|
|
import aiohttp |
|
|
import aiohttp |
|
|
from aiohttp import web, client_exceptions |
|
|
from aiohttp import web, client_exceptions |
|
@ -507,7 +509,7 @@ class Daemon(Logger): |
|
|
fut = asyncio.run_coroutine_threadsafe(self.taskgroup.cancel_remaining(), self.asyncio_loop) |
|
|
fut = asyncio.run_coroutine_threadsafe(self.taskgroup.cancel_remaining(), self.asyncio_loop) |
|
|
try: |
|
|
try: |
|
|
fut.result(timeout=2) |
|
|
fut.result(timeout=2) |
|
|
except (asyncio.TimeoutError, asyncio.CancelledError): |
|
|
except (concurrent.futures.TimeoutError, concurrent.futures.CancelledError, asyncio.CancelledError): |
|
|
pass |
|
|
pass |
|
|
self.logger.info("removing lockfile") |
|
|
self.logger.info("removing lockfile") |
|
|
remove_lockfile(get_lockfile(self.config)) |
|
|
remove_lockfile(get_lockfile(self.config)) |
|
|