This resolves a bug where gunicorn kept killing the workers at startup because the initial file system can took too long. Simply putting this inside a background task would not be an option, because each worker would still scan all of the .json files once, instead of scanning them one time total.
This resolves a bug where gunicorn kept killing the workers at startup because the initial file system can took too long. Simply putting this inside a background task would not be an option, because each worker would still scan all of the
.json
files once, instead of scanning them one time total.