GetJobLogUploadStatus

get_job_log_upload_status(public_api_client, job_id)
Expand source code
get_job_log_upload_status(public_api_client, job_id):
"""
Description
-----------
To get the log uploading status of a given job.
Args
----
public_api_client: QDC api client object.
job_id: Id of the job.
Returns
-------
string: State of the job log upload status. like completed, inProgress, noLogs etc.
None: In case of any failure.
Usages
------
job_id = "1234"
log_upload_status = qdc_api.get_job_log_upload_status(public_api_client, job_id)
print(f"Job log upload status is in {log_upload_status.lower()}")
"""
poll_job_response = get_jobs_id.sync_detailed(id=job_id, client=get_client_with_headers_added(public_api_client))
if poll_job_response.status_code == 200:
response_data = poll_job_response.content.decode('utf-8')
print(f"Job response: {response_data}")
return poll_job_response.parsed.log_upload_status

Description

To get the log uploading status of a given job.

Arguments

  • public_api_client: QDC api client object.
  • job_id: Id of the job.

Returns

  • string: State of the job log upload status. like completed, inProgress, noLogs etc.
  • None: In case of any failure.

Usages

job_id = "1234"
log_upload_status = qdc_api.get_job_log_upload_status(public_api_client, job_id)
print(f"Job log upload status is in {log_upload_status.lower()}")