Use timeout(1) to timeout and kill gerrit hooks.
If a gerrit hook blocks none of the other hooks queued behind it run. Give each hook subprocess 10 minutes to run otherwise timeout and kill that process. Change-Id: Ic5e1243e08088dbf0c5bff49e7fc05bcb867819b Reviewed-on: https://review.openstack.org/11475 Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
35923f2f21
commit
1160068ce4
@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
python /usr/local/gerrit/scripts/update_bug.py change-merged "$@"
|
||||
# Use timeout to kill any process running longer than 10 minutes.
|
||||
timeout -k 2m 10m python /usr/local/gerrit/scripts/update_bug.py change-merged "$@"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
python /usr/local/gerrit/scripts/update_blueprint.py patchset-created "$@"
|
||||
python /usr/local/gerrit/scripts/update_bug.py patchset-created "$@"
|
||||
python /usr/local/gerrit/scripts/notify_doc_impact.py patchset-created "$@"
|
||||
# Use timeout to kill any process running longer than 10 minutes.
|
||||
timeout -k 2m 10m python /usr/local/gerrit/scripts/update_blueprint.py patchset-created "$@"
|
||||
timeout -k 2m 10m python /usr/local/gerrit/scripts/update_bug.py patchset-created "$@"
|
||||
timeout -k 2m 10m python /usr/local/gerrit/scripts/notify_doc_impact.py patchset-created "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user