https://pantsbuild.org/ logo
#general
Title
# general
g

gorgeous-eve-12553

12/12/2022, 12:26 AM
Actually, looking back on it, should I even be relying on native tooling for features such as hot-reload when using Pants? For example when I build a fastapi server and run it with uvicorn, should I let uvicorn reload with a
--reload
flag or should I start the process with pants and let pants restart the process with a
--watch
or something else?
h

happy-kitchen-89482

12/12/2022, 12:55 AM
Yes, we recommend setting
restartable=True
on the binary target, and letting Pants handle the hot reloading
since it's already watching the filesystem
And in fact can do so more precisely than uvicorn can since it is fully aware of all the inputs that should invalidate the process
c

curved-television-6568

12/12/2022, 2:03 AM
The pants flag btw is
--loop
🙂
👍 1
3 Views