mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Cleaning up FIXMEs
This commit is contained in:
@@ -181,7 +181,7 @@ class PlaybookExecutor:
|
||||
self.display.display("No issues encountered")
|
||||
return result
|
||||
|
||||
# FIXME: this stat summary stuff should be cleaned up and moved
|
||||
# TODO: this stat summary stuff should be cleaned up and moved
|
||||
# to a new method, if it even belongs here...
|
||||
self._display.banner("PLAY RECAP")
|
||||
|
||||
|
||||
@@ -108,11 +108,11 @@ class ResultProcess(multiprocessing.Process):
|
||||
self._send_result(('register_host_var', result._host, result._task.register, result._result))
|
||||
|
||||
# send callbacks, execute other options based on the result status
|
||||
# FIXME: this should all be cleaned up and probably moved to a sub-function.
|
||||
# the fact that this sometimes sends a TaskResult and other times
|
||||
# sends a raw dictionary back may be confusing, but the result vs.
|
||||
# results implementation for tasks with loops should be cleaned up
|
||||
# better than this
|
||||
# TODO: this should all be cleaned up and probably moved to a sub-function.
|
||||
# the fact that this sometimes sends a TaskResult and other times
|
||||
# sends a raw dictionary back may be confusing, but the result vs.
|
||||
# results implementation for tasks with loops should be cleaned up
|
||||
# better than this
|
||||
if result.is_unreachable():
|
||||
self._send_result(('host_unreachable', result))
|
||||
elif result.is_failed():
|
||||
@@ -163,8 +163,8 @@ class ResultProcess(multiprocessing.Process):
|
||||
except (KeyboardInterrupt, IOError, EOFError):
|
||||
break
|
||||
except:
|
||||
# FIXME: we should probably send a proper callback here instead of
|
||||
# simply dumping a stack trace on the screen
|
||||
# TODO: we should probably send a proper callback here instead of
|
||||
# simply dumping a stack trace on the screen
|
||||
traceback.print_exc()
|
||||
break
|
||||
|
||||
|
||||
@@ -131,7 +131,6 @@ class WorkerProcess(multiprocessing.Process):
|
||||
task_result = TaskResult(host, task, dict(unreachable=True))
|
||||
self._rslt_q.put(task_result, block=False)
|
||||
except:
|
||||
# FIXME: most likely an abort, catch those kinds of errors specifically
|
||||
break
|
||||
except Exception as e:
|
||||
if isinstance(e, (IOError, EOFError, KeyboardInterrupt)) and not isinstance(e, TemplateNotFound):
|
||||
@@ -144,7 +143,6 @@ class WorkerProcess(multiprocessing.Process):
|
||||
except:
|
||||
debug("WORKER EXCEPTION: %s" % e)
|
||||
debug("WORKER EXCEPTION: %s" % traceback.format_exc())
|
||||
# FIXME: most likely an abort, catch those kinds of errors specifically
|
||||
break
|
||||
|
||||
debug("WORKER PROCESS EXITING")
|
||||
|
||||
@@ -341,7 +341,6 @@ class TaskExecutor:
|
||||
result = None
|
||||
for attempt in range(retries):
|
||||
if attempt > 0:
|
||||
# FIXME: this should use the self._display.callback/message passing mechanism
|
||||
self._display.display("FAILED - RETRYING: %s (%d retries left). Result was: %s" % (self._task, retries-attempt, result), color="red")
|
||||
result['attempts'] = attempt + 1
|
||||
|
||||
@@ -480,8 +479,6 @@ class TaskExecutor:
|
||||
correct connection object from the list of connection plugins
|
||||
'''
|
||||
|
||||
# FIXME: calculation of connection params/auth stuff should be done here
|
||||
|
||||
if not self._play_context.remote_addr:
|
||||
self._play_context.remote_addr = self._host.address
|
||||
|
||||
|
||||
Reference in New Issue
Block a user