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

Commit

Permalink
Make project_id optional for background job
Browse files Browse the repository at this point in the history
of type akamai_check_and_update_cert_status

Change-Id: I972052c89de17d5c857dd4900d762dfb280c8bc9
  • Loading branch information
isaacm committed Aug 2, 2016
1 parent b76d981 commit 1598779
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions poppy/manager/default/background_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ def post_job(self, job_type, kwargs):
consume=True
)

for cert_dict in queue_data:
for cert in queue_data:
cert_dict = dict()
try:
cert_dict = json.loads(cert_dict)
cert_dict = json.loads(cert)
LOG.info(
'Starting to check status on domain: {0},'
'for project_id: {1}'
Expand All @@ -69,7 +70,7 @@ def post_job(self, job_type, kwargs):
)
t_kwargs = {
"cert_obj_json": json.dumps(cert_dict),
"project_id": kwargs.get("project_id")
"project_id": cert_dict.get("project_id")
}
self.distributed_task_controller.submit_task(
check_cert_status_and_update_flow.
Expand Down Expand Up @@ -99,9 +100,10 @@ def post_job(self, job_type, kwargs):

cname_host_info_list = []

for cert_dict in queue_data:
for cert in queue_data:
cert_dict = dict()
try:
cert_dict = json.loads(cert_dict)
cert_dict = json.loads(cert)

domain_name = cert_dict["domain_name"]
san_cert = (
Expand Down
2 changes: 1 addition & 1 deletion poppy/transport/validators/schemas/background_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BackgroundJobSchema(schema_base.SchemaBase):
},
'project_id': {
'type': 'string',
'required': True
'required': False
}
}
},
Expand Down

0 comments on commit 1598779

Please sign in to comment.