Revision 5483fd73
ID | 5483fd739f21071e98aeff1805cd172f59691b7f |
Parent | 2d6b5414 |
Child | cb4d3314 |
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>
Files
- added
- modified
- copied
- renamed
- deleted