From a37d015b475be869a38616e4627ecc1de18c1583 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Sat, 31 Dec 2016 12:34:18 +0100 Subject: [PATCH] mm2_crawler: fix crawler auto kill Before starting the crawler old crawler processes are killed to not have old crawlers running and consuming (lots of) memory. This adapts the pgrep and pkill from ^/usr/bin/python to ^/usr/bin/python2 -s Signed-off-by: Adrian Reber --- roles/mirrormanager/crawler/files/crawler.cron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mirrormanager/crawler/files/crawler.cron b/roles/mirrormanager/crawler/files/crawler.cron index f17db3b8f7..5f1ab7aea5 100644 --- a/roles/mirrormanager/crawler/files/crawler.cron +++ b/roles/mirrormanager/crawler/files/crawler.cron @@ -11,4 +11,4 @@ # wait for 5 minutes to give the crawler a chance to shutdown. After that the # crawler is killed. To make sure we only end the cron started crawler we look # for the following process "/usr/bin/python /usr/bin/mm2_crawler --threads 25". -0 */12 * * * mirrormanager [ "`hostname -s`" == "mm-crawler02" ] && sleep 2h; pkill -14 -f "^/usr/bin/python /usr/bin/mm2_crawler --threads 25"; sleep 5m; pkill -9 -f "^/usr/bin/python /usr/bin/mm2_crawler --threads 25"; /usr/bin/mm2_crawler --threads 25 --timeout-minutes 180 `/usr/local/bin/run_crawler.sh 2` > /dev/null 2>&1 +0 */12 * * * mirrormanager [ "`hostname -s`" == "mm-crawler02" ] && sleep 2h; pkill -14 -f "^/usr/bin/python2 -s /usr/bin/mm2_crawler --threads 25"; sleep 5m; pkill -9 -f "^/usr/bin/python2 -s /usr/bin/mm2_crawler --threads 25"; /usr/bin/mm2_crawler --threads 25 --timeout-minutes 180 `/usr/local/bin/run_crawler.sh 2` > /dev/null 2>&1