Fix variable not defined

This commit is contained in:
amercader 2014-07-30 15:49:02 +01:00
parent 33000dbfbc
commit 13dbb1eea4
1 changed files with 1 additions and 2 deletions

View File

@ -298,7 +298,6 @@ def harvest_jobs_run(context,data_dict):
# Flag finished jobs as such # Flag finished jobs as such
jobs = harvest_job_list(context,{'source_id':source_id,'status':u'Running'}) jobs = harvest_job_list(context,{'source_id':source_id,'status':u'Running'})
if len(jobs): if len(jobs):
package_index = PackageSearchIndex()
for job in jobs: for job in jobs:
if job['gather_finished']: if job['gather_finished']:
objects = session.query(HarvestObject.id) \ objects = session.query(HarvestObject.id) \
@ -321,7 +320,7 @@ def harvest_jobs_run(context,data_dict):
job_obj.save() job_obj.save()
# Reindex the harvest source dataset so it has the latest # Reindex the harvest source dataset so it has the latest
# status # status
get_action('harvest_source_reindex')(reindex_context, get_action('harvest_source_reindex')(context,
{'id': job_obj.source.id}) {'id': job_obj.source.id})
# resubmit old redis tasks # resubmit old redis tasks