Use different timestamp for each crawl 29/108729/3
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Wed, 9 Nov 2016 13:19:10 +0000 (14:19 +0100)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Mon, 16 Jan 2017 10:07:49 +0000 (11:07 +0100)
Change-Id: I756a9ed6a722c9a0de99430aa6f042e4cca0130e
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
tsp/jobs/trigger_downloads.sh
tsp/jobs/watcher.sh

index 53c12a2..648e89a 100755 (executable)
@@ -21,19 +21,20 @@ export TSP_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)/.."
 . "${TSP_DIR}/common.sh"
 
 URL="$1"
+TIMESTAMP="$2"
 
 test -n "${URL}" || die "Missing argument: url"
+test -n "${TIMESTAMP}" || die "Missing argument: timestamp"
 
 mkdir -p "${WS_WATCHER}"
 cd "${WS_WATCHER}"
 
 # Create required files
 touch dispatched_urls
-touch timestamp
-touch timestamp_snapshot
+touch "${TIMESTAMP}"
 
 # Crawl given url
-timeout 240 "${TSP_DIR}/scripts/crawler.py" --log DEBUG "${URL}" || die "Crawl failed" "$?"
+timeout 240 "${TSP_DIR}/scripts/crawler.py" --timestamp "${TIMESTAMP}" --log DEBUG "${URL}" || die "Crawl failed" "$?"
 
 # Read next buid_nr
 touch next_dwn
index 0580698..9f0cdea 100755 (executable)
@@ -21,5 +21,5 @@ export TSP_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)/.."
 . "${TSP_DIR}/common.sh"
 
 # Dispatch tsp/jobs/trigger_downloads.sh for common snapshot and prerelease urls
-tspoll -L SNAPSHOT sh "${TSP_DIR}/jobs/trigger_downloads.sh" "http://download.tizen.org/snapshots/tizen/common/"
-tspoll -L PRERELEASE sh "${TSP_DIR}/jobs/trigger_downloads.sh" "http://download.tizen.org/prerelease/tizen/common/"
+tspoll -L SNAPSHOT sh "${TSP_DIR}/jobs/trigger_downloads.sh" "http://download.tizen.org/snapshots/tizen/common/" tizen_4.0_snapshot
+tspoll -L PRERELEASE sh "${TSP_DIR}/jobs/trigger_downloads.sh" "http://download.tizen.org/prerelease/tizen/common/" tizen_4.0_prerelease