[patchew-devel] [PATCH 4/4] importer: Kill `patchew-cli import` command if timeout

Fam Zheng posted 4 patches 7 years, 2 months ago
There is a newer version of this series
[patchew-devel] [PATCH 4/4] importer: Kill `patchew-cli import` command if timeout
Posted by Fam Zheng 7 years, 2 months ago
It resolves some rare hanging in the patchew import command.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 scripts/patchew-importer | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/patchew-importer b/scripts/patchew-importer
index 4a72a28..5e80fb5 100755
--- a/scripts/patchew-importer
+++ b/scripts/patchew-importer
@@ -73,7 +73,7 @@ imported()
 import()
 {
     echo import $@
-    if ! $PATCHEW_CLI import $@; then
+    if ! timeout -k 600 600 $PATCHEW_CLI import $@; then
         cp $@ $BAD_MESSAGES_DIR
         echo "(bad message saved in $BAD_MESSAGES_DIR)"
     fi
-- 
2.14.3