From 0ce59a29b6b51b15bc9de36a727d4d3b741b93e4 Mon Sep 17 00:00:00 2001 From: kindly Date: Fri, 12 Apr 2013 12:32:33 +0100 Subject: [PATCH] delete insead of update harvest objects when error --- ckanext/harvest/queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/harvest/queue.py b/ckanext/harvest/queue.py index 37e8c50..fba5e96 100644 --- a/ckanext/harvest/queue.py +++ b/ckanext/harvest/queue.py @@ -128,7 +128,7 @@ def gather_callback(channel, method, header, body): channel.basic_ack(method.delivery_tag) model.Session.query(HarvestObject).filter_by( harvest_job_id=job.id - ).update(dict(state='ERROR', current=False)) + ).delete() raise finally: job.gather_finished = datetime.datetime.now()