Skip to content

Hot reload task function #1381

Answered by ewjoachim
ardevik asked this question in Q&A
May 4, 2025 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

so your answer "whenever a new task is dynamically added to the app in the current process, it will be available to the worker" its mean i can add new python module dynamically right without restart the worker.

It all boils down to what exactly "dynamically" means. Also, I'm relying a lot here on Python's default behavior, so the limits we have is the limits Python has and the technical choices we made.

What I mean by dynamically is that if after the worker has started, some code running (e.g. called by a job) defines a new task, it will be available.

The problem you'll have is that by default, Python doesn't reload modules when they're changed. If a running Python interpreter has alrea…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ardevik
Comment options

@ewjoachim
Comment options

Answer selected by ardevik
@ardevik
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants