This validates all `frappe-dependencies` and exits with 1 if any of
specifications fail.
This will be internal feature for FC for now. If this works well we can
make the validation fail during install-app itself without requiring any
additional command/steps.
We observed that in some cases files are missing when yarn reuses them
from cache. Not sure what's causing it but checking files seems to at
least fix it. This is probably some yarn bug.
It will still crash if spawned outside of procfile. This is just a
workaround for developers who are starting out and won't be able to
figure out the crash. You can also add env variables in your RC file.
Permanent fix: Use Linux.
Click supports pulling args from an envvar if it is present,
this would be quicker and cleaner than calling a dummy command
to check if the feature is supported
killasgroup will ensure that all child processes die even if gunicorn
fails to do it. This isn't truly required because stopwaitsecs and
gunicorn graceful timeout work fine. In any case, if supervisor has to
send SIGKILL, it better send it to entire process group.
Dev dependencies are not installed if developer_mode is not enabled.
When creating a new bench it's not possible to modify this config
upfront, so offer a flag to do it instead.
Note:
- Disabled by default.
- Very few people need this, those who write and run tests locally primarily.
- You mostly should not do this in CI, do `bench setup requirements --dev` explicitly instead.
Problem:
- Prerequisite: long running reqeust is going on.
- `bench restart` is requested.
- supervisord sends sigterm to gunicorn master process.
- gunicorn passes it to all child table and waits for graceful shutdown (30 seconds)
- supervisord has no chill, and sends sigkill to master process in 10 seconds
- gunicorn master proesss is dead, so now child workers will keep running until they complete request which can take a really long time.
- This entire time the sites will be down.
Fix:
- Explicitly encode default graceful_timeout in config - 30 seconds.
- Make supervisor wait 10 more seconds for gunicorn to do its thing, then only send sigkill.