Skip to content

🪲 BUG-#246: Run background cleanup regardless of config#296

Merged
FernandoCelmer merged 2 commits into
developfrom
feature/246
May 3, 2026
Merged

🪲 BUG-#246: Run background cleanup regardless of config#296
FernandoCelmer merged 2 commits into
developfrom
feature/246

Conversation

@FernandoCelmer
Copy link
Copy Markdown
Member

@FernandoCelmer FernandoCelmer commented May 2, 2026

Description

Modified files:

  • dotflow/core/workflow.py — Changed elif self.config: to else: in Manager.__init__. The cleanup thread that joins the background worker and fires on_success/on_failure callbacks is now always started when mode=BACKGROUND, regardless of whether config is provided.
  • tests/core/test_workflow.py — Added two new tests covering the fixed scenario: test_background_callback_runs_without_config and test_background_callback_failure_runs_without_config.

Motivation and Context

When running in BACKGROUND mode without a config object (config=None), the original conditional chain fell through both branches — neither _callback_workflow nor the cleanup thread was ever started. This silently swallowed on_success and on_failure callbacks entirely.

Closes #246

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation updated (documentation was updated and published)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@FernandoCelmer FernandoCelmer self-assigned this May 2, 2026
@FernandoCelmer FernandoCelmer added the bug Something isn't working label May 2, 2026
FernandoCelmer

This comment was marked as low quality.

@FernandoCelmer FernandoCelmer merged commit 5accb64 into develop May 3, 2026
10 checks passed
@FernandoCelmer FernandoCelmer deleted the feature/246 branch May 3, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant