Refresh session after each harvest stage
Otherwise the eg the source config got cached and you needed to restart the consumers to refresh it.
This commit is contained in:
parent
1f2467af33
commit
5c17a525c1
|
@ -143,6 +143,7 @@ def gather_callback(channel, method, header, body):
|
||||||
except KeyError:
|
except KeyError:
|
||||||
log.error('No harvest job id received')
|
log.error('No harvest job id received')
|
||||||
finally:
|
finally:
|
||||||
|
model.Session.remove()
|
||||||
channel.basic_ack(method.delivery_tag)
|
channel.basic_ack(method.delivery_tag)
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,7 +215,7 @@ def fetch_callback(channel, method, header, body):
|
||||||
else:
|
else:
|
||||||
obj.report_status = 'added'
|
obj.report_status = 'added'
|
||||||
obj.save()
|
obj.save()
|
||||||
|
model.Session.remove()
|
||||||
channel.basic_ack(method.delivery_tag)
|
channel.basic_ack(method.delivery_tag)
|
||||||
|
|
||||||
def get_gather_consumer():
|
def get_gather_consumer():
|
||||||
|
|
Loading…
Reference in New Issue