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:
amercader 2013-03-01 12:52:58 +00:00
parent 3b6468b181
commit bd128ab58b
1 changed files with 2 additions and 1 deletions

View File

@ -143,6 +143,7 @@ def gather_callback(channel, method, header, body):
except KeyError:
log.error('No harvest job id received')
finally:
model.Session.remove()
channel.basic_ack(method.delivery_tag)
@ -214,7 +215,7 @@ def fetch_callback(channel, method, header, body):
else:
obj.report_status = 'new'
obj.save()
model.Session.remove()
channel.basic_ack(method.delivery_tag)
def get_gather_consumer():