def _future_completed(future):
 exc = future.exception()
 if exc:
  log.debug('Failed to run task on executor', exc_info=exc)

def _future_completed ( future ) : exc = future . exception ( ) if exc : log . debug ( 'Failed to run task on executor' , exc_info = exc )
helper for run_in_executor() .