You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is! Once the decorator is applied it replaces the original function object with the daemon manager. This allows you to call stop() on the function to terminate the daemon. Here is an example.
Some call outs that you may be aware of but are worth mentioning anyway:
Once wrapped, the function call starts acting like a singleton and will only have one running daemon at a time. If you need to start a daemon for each call then the decorator is insufficient for your use case.
The wrapped function needs to manage its own loop if you only use the @run decorator. If you have a function that you want to run repeatedly from the daemon then the @step decorator will work just like @run but will put your function in an infinite loop. Both versions can be stopped by calling the stop() function added to the wrapped function object.
Hello, I am glad to have found your package after such a long time looking for something simple to run my Django app command inside as a daemon !
I was wondering if there is a way to use daemonizer decorator to stop the process ?
The text was updated successfully, but these errors were encountered: