masterd: Shutdown only once running jobs have been processed
Until now, if masterd received a fatal signal, it would start shutting down immediately. In the meantime it would hang while jobs are still processed. Clients couldn't connect anymore to retrieve a jobs' status. This this patch masterd checks if any job is running before shutting down. If there is it'll check again every five seconds. Once all jobs are finished, it waits another five seconds to give clients a chance to retrieve the jobs' status. After that masterd will shutdown in a clean fashion. If a second signal is received the old behaviour is preserved. Signed-off-by:Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Loading
Please register or sign in to comment