def _run_task(key: str, fn: Callable[[], _T]) -> Callable[[], _T]:
  """Returns fn() and logs any error."""
  try:
    return fn()
  except:
    logging.exception('Error in task %s', key)
    raise
Returns fn() and logs any error.
concordia/utils/concurrency.py