summaryrefslogtreecommitdiff
path: root/tsp
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2017-09-26 12:58:33 (GMT)
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-10-16 11:21:47 (GMT)
commita202373414535118c8679d6b2135a0778faa8ef6 (patch)
tree5f952fc9739044b6f468d6887d301eeea1b97684 /tsp
parent2a235c23588f59957514f70feb1fd25c05ba7fc6 (diff)
downloadmajor-a202373414535118c8679d6b2135a0778faa8ef6.zip
major-a202373414535118c8679d6b2135a0778faa8ef6.tar.gz
major-a202373414535118c8679d6b2135a0778faa8ef6.tar.bz2
Skip already queued url downloadsrefs/changes/38/181838/1
Also update killer to use "-k" instead of kill `tsp -p`. Change-Id: I8e2c61cc1b6e212fa72217cf5bc6ed1a23f2df84
Diffstat (limited to 'tsp')
-rwxr-xr-xtsp/jobs/trigger_downloads.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tsp/jobs/trigger_downloads.sh b/tsp/jobs/trigger_downloads.sh
index 15bdabc..981e6be 100755
--- a/tsp/jobs/trigger_downloads.sh
+++ b/tsp/jobs/trigger_downloads.sh
@@ -66,7 +66,12 @@ do
test -n "${url}" || continue
echo "Processing: ${url}"
# kill currently running jobs for this url
- for i in $(tsmaster | awk -v URL="$url" '$2 ~ "running" && $0 ~ URL {print $1}'); do kill "$(tsmaster -p "$i")"; done
+ for i in $(tsmaster | awk -v URL="$url" '$2 ~ "running" && $0 ~ URL {print $1}'); do tsmaster -k "$i"; done
+ # skip url if a job is already queued
+ test -z "$(tsmaster | awk -v URL="$url" '$2 ~ "queued" && $0 ~ URL {print $1}')" || {
+ echo "download is already queued. skipping..."
+ continue
+ }
next=$((next+1))
dwn_next="${next}"
# prepare download directory