def main(exportJob: str) -> object:
    """Check the status of compliance export job id."""
    json_export_object = json.loads(exportJob)
    export_job_id = json_export_object.get("compliance_job_id", "")
    start_time = json_export_object.get("start_time", 0)
    logging.info("using pyTenable client to check compliance export job status")
    logging.info("checking status at compliance/{}/status".format(export_job_id))
    tio = TenableIO()
    job_details = tio.exports.status("compliance", export_job_id)
    logging.info("received a response from compliance/{}/status".format(export_job_id))
    logging.info(job_details)

    tio_status = ["ERROR", "CANCELLED"]
    if job_details["status"] not in tio_status:
        try:
            job_details["exportJobId"] = export_job_id
            job_details["start_time"] = start_time
            send_chunks_to_queue(job_details)
        except Exception as err:
            logging.warning("error while sending chunks to queue")
            logging.warning(job_details)
            logging.warning(err)

    return job_details
Check the status of compliance export job id.
Solutions/Tenable App/Data Connectors/TenableVM/TenableComplianceExportStatusAndSendChunks/__init__.py