delete insead of update harvest objects when error

This commit is contained in:
kindly 2013-04-12 12:32:33 +01:00
parent 7d7657f94a
commit 0ce59a29b6
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ def gather_callback(channel, method, header, body):
channel.basic_ack(method.delivery_tag) channel.basic_ack(method.delivery_tag)
model.Session.query(HarvestObject).filter_by( model.Session.query(HarvestObject).filter_by(
harvest_job_id=job.id harvest_job_id=job.id
).update(dict(state='ERROR', current=False)) ).delete()
raise raise
finally: finally:
job.gather_finished = datetime.datetime.now() job.gather_finished = datetime.datetime.now()