def __update_job_status__()

in 04_EdgeApplication/turbine/ota.py [0:0]


    def __update_job_status__(self, job_id, status, details):
        '''
            After receiving a new signal that there is a model to be deployed
            Update the IoT Job to inform the user the current status of this
            process
        '''
        payload = json.dumps({
            "status": status,
            "statusDetails": {"info": details },
            "includeJobExecutionState": False,
            "includeJobDocument": False,
            "stepTimeoutInMinutes": 2,
        })
        logging.info("Updating IoT job status: %s" % details)
        self.mqttc.publish('$aws/things/%s/jobs/%s/update' % ( self.device_name, job_id), payload)