import logging
import asyncio

from typing import (
	Any,
)

logger = logging.getLogger(__name__)


def handle_task_result(fut: asyncio.Future[Any]) -> None:
	try:
		fut.result()

		logger.debug(
			dict(fut=fut, msg='done'),
			stacklevel=2,
		)
	except:
		logger.exception(
			'',
			stacklevel=2,
		)
