Skip to content

Add --reload-dir argument #459

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

montaguegabe
Copy link

@montaguegabe montaguegabe commented May 2, 2025

This is a small change that partially addresses #318, and allows multiple reload dirs to be specified via the CLI instead of using just the CWD, using the --reload-dir option, which can be passed multiple times for multiple reload directories.

Why I need this:
I use TaskIQ with tasks loaded from pip packages that I've installed with pip install -e path/to/local/package in development, and am constantly editing and having to manually reload TaskIQ due to the fact that the locally-installed package is outside of the CWD.

  • If the --reload-dir option is not passed, the default of using the CWD is still used.
  • pytest tests still pass
  • Committed with pre-commit hooks installed and working
  • Adds a logger.debug of the reload dirs being watched.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants