Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When SIGTERM is received by the process that is building a build, we only log a message instead of passing it to the child processes (`pip` running inside the Docker container, for example). Otherwise, the `pip` process also receives the SIGTERM and it kills itself, producing a `exit_status != 0`, registering this as a BuildCommand and making the whole build to fail. After that, celery "stops gracefully" with a failed build. This is useful combined with supervisor to make our builders to stop gracefully in this scenario: 1. supervisorctl stop build 2. celery receives the SIGTERM and logs the warning message 3. supervisor waits for `stopwaitsecs` before sending SIGKILL
- Loading branch information