delete insead of update harvest objects when error
This commit is contained in:
parent
7d7657f94a
commit
0ce59a29b6
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue