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
I'm using a lifespan task to do some initialisation stuff when starting the application (e.g. loading a config file and things like that). The code looks like that:
When running reflex locally, this results in the init function to be executed once in the beginning, just as I expect (prints added to the function show up once). However, when running in a Docker setup (based on the production-compose example, the function get's called 25 times, apparently in parallel (prints appear multiple times and are intermingled).
Why is it called multiple times in the docker container? How can I avoid that?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a lifespan task to do some initialisation stuff when starting the application (e.g. loading a config file and things like that). The code looks like that:
When running reflex locally, this results in the
initfunction to be executed once in the beginning, just as I expect (prints added to the function show up once). However, when running in a Docker setup (based on the production-compose example, the function get's called 25 times, apparently in parallel (prints appear multiple times and are intermingled).Why is it called multiple times in the docker container? How can I avoid that?
Beta Was this translation helpful? Give feedback.
All reactions