Description
In Manager.__init__ (core/workflow.py, lines 155-163), the background cleanup thread is only started when self.config is truthy (elif self.config:). When no config is provided (config=None), the _background_cleanup function is never executed.
This means _callback_workflow is never called, and on_success/on_failure callbacks are silently dropped in background mode without config.
Location
dotflow/core/workflow.py — lines 155-163
Current Behavior
if mode != TypeExecution.BACKGROUND:
self._callback_workflow(tasks=self.tasks)
elif self.config:
def _background_cleanup():
self.thread.join()
self._callback_workflow(tasks=self.tasks)
threading.Thread(target=_background_cleanup, daemon=True).start()
When config=None, neither branch fires _callback_workflow for background mode.
Expected Behavior
if mode != TypeExecution.BACKGROUND:
self._callback_workflow(tasks=self.tasks)
else:
def _background_cleanup():
self.thread.join()
self._callback_workflow(tasks=self.tasks)
threading.Thread(target=_background_cleanup, daemon=True).start()
Always run _background_cleanup for background mode, regardless of config.
Impact
- Severity: Critical
- Symptom:
on_success/on_failure callbacks silently never execute in background mode without config
- Tracer, metrics, and server finalization hooks are also skipped
Priority
Critical
Description
In
Manager.__init__(core/workflow.py, lines 155-163), the background cleanup thread is only started whenself.configis truthy (elif self.config:). When no config is provided (config=None), the_background_cleanupfunction is never executed.This means
_callback_workflowis never called, andon_success/on_failurecallbacks are silently dropped in background mode without config.Location
dotflow/core/workflow.py— lines 155-163Current Behavior
When
config=None, neither branch fires_callback_workflowfor background mode.Expected Behavior
Always run
_background_cleanupfor background mode, regardless of config.Impact
on_success/on_failurecallbacks silently never execute in background mode without configPriority
Critical