From b885dfdda647d33f392a2e08a11e94f9a6f79c28 Mon Sep 17 00:00:00 2001 From: Luke Campbell Date: Thu, 20 Apr 2017 13:46:17 -0400 Subject: [PATCH] Adds script to clear all harvests This will clear all harvests and immediately requeue all harvests. This is useful if there's a schema change which requires every source to be reharvested. --- contrib/scripts/clear-harvests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 contrib/scripts/clear-harvests.sh diff --git a/contrib/scripts/clear-harvests.sh b/contrib/scripts/clear-harvests.sh new file mode 100644 index 0000000..30adfe6 --- /dev/null +++ b/contrib/scripts/clear-harvests.sh @@ -0,0 +1,8 @@ +#!/bin/bash +HARVEST="$CKAN_HOME/bin/paster --plugin=ckanext-harvest harvester -c $CKAN_CONFIG/ckan.ini" +for source in $($HARVEST sources | grep 'Source id' | awk '{print $3}'); do + $HARVEST clearsource $source +done + +$HARVEST job-all +