Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Merge "Append to run_list, ignore_list during task exec"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jun 30, 2016
2 parents 552a3c9 + d35fbb5 commit 31638e2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions poppy/manager/default/background_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def post_job(self, job_type, kwargs):
consume=True
)

run_list += queue_data
for cert_dict in queue_data:
try:
cert_dict = json.loads(cert_dict)
Expand All @@ -77,11 +76,15 @@ def post_job(self, job_type, kwargs):
check_cert_status_and_update_flow,
**t_kwargs
)
run_list.append(cert_dict)
except Exception as e:
akamai_driver.san_mapping_queue.enqueue_san_mapping(
json.dumps(cert_dict)
)
run_list.remove(cert_dict)
try:
akamai_driver.san_mapping_queue.\
enqueue_san_mapping(json.dumps(cert_dict))
except Exception as e:
akamai_driver.san_mapping_queue.\
enqueue_san_mapping(cert_dict)

cert_dict['error_message'] = str(e.message)
ignore_list.append(cert_dict)
LOG.exception(e)
Expand All @@ -95,7 +98,6 @@ def post_job(self, job_type, kwargs):

cname_host_info_list = []

run_list += queue_data
for cert_dict in queue_data:
try:
cert_dict = json.loads(cert_dict)
Expand Down Expand Up @@ -137,8 +139,8 @@ def post_job(self, job_type, kwargs):
),
"cnameType": "EDGE_HOSTNAME"
})
run_list.append(cert_dict)
except Exception as e:
run_list.remove(cert_dict)
cert_dict['error_message'] = str(e.message)
ignore_list.append(cert_dict)
LOG.exception(e)
Expand Down

0 comments on commit 31638e2

Please sign in to comment.