def get_status(self, job_id):
    'Obtains the current status of the job.\n            Sends objective values/metrics to the DB when a trial succeeded.\n            Compares objective values and decides wether to delete or keep files. \n\n        Args:\n            job_id (str): Sherpa Job_ID / Name of the workflow that was started by Argo\n\n        Returns:\n            sherpa.schedulers._JobStatus: the job-status.\n        '
    response_status = self.make_request(request='GET', data=job_id)
    if (response_status.status_code == 200):
        status = json.loads(response_status.content)['status']['phase']
        if (status == 'Succeeded'):
            if (self.trials[job_id]['finished'] == True):
                logging.info('Set status to finished for trial : {}'.format(self.trials[job_id]['trial'].id))
            else:
                filename = self.metrics_filename
                input_path = self.trials[job_id]['output_path']
                metrics = read_json(input_path, filename)
                logging.info('Send metrics for trial: {}'.format(self.trials[job_id]['trial'].id))
                self.client.send_metrics(trial=self.trials[job_id]['trial'], iteration=self.trials[job_id]['epochs'], objective=metrics[self.objective], context=metrics)
                status = 'Running'
                self.trials[job_id]['finished'] = True
                self.file_strategy(job_id, metrics)
        elif (status == 'Failed'):
            delete_s3_objects(self.trials[job_id]['output_path'])
    elif (job_id in self.killed_jobs):
        status = 'Stopped'
    else:
        status = 'Other'
    s = self.decode_status.get(status, _JobStatus.other)
    if (s != self.trials[job_id]['status']):
        logging.info('Jobstatus: {} for Job {}'.format(status, job_id))
    self.trials[job_id]['status'] = s
    return s
Obtains the current status of the job.
    Sends objective values/metrics to the DB when a trial succeeded.
    Compares objective values and decides wether to delete or keep files. 

Args:
    job_id (str): Sherpa Job_ID / Name of the workflow that was started by Argo

Returns:
    sherpa.schedulers._JobStatus: the job-status.
def get_status(self, job_id):
    'Obtains the current status of the job.\n            Sends objective values/metrics to the DB when a trial succeeded.\n            Compares objective values and decides wether to delete or keep files. \n\n        Args:\n            job_id (str): Sherpa Job_ID / Name of the workflow that was started by Argo\n\n        Returns:\n            sherpa.schedulers._JobStatus: the job-status.\n        '
    response_status = self.make_request(request='GET', data=job_id)
    if (response_status.status_code == 200):
        status = json.loads(response_status.content)['status']['phase']
        if (status == 'Succeeded'):
            if (self.trials[job_id]['finished'] == True):
                logging.info('Set status to finished for trial : {}'.format(self.trials[job_id]['trial'].id))
            else:
                filename = self.metrics_filename
                input_path = self.trials[job_id]['output_path']
                metrics = read_json(input_path, filename)
                logging.info('Send metrics for trial: {}'.format(self.trials[job_id]['trial'].id))
                self.client.send_metrics(trial=self.trials[job_id]['trial'], iteration=self.trials[job_id]['epochs'], objective=metrics[self.objective], context=metrics)
                status = 'Running'
                self.trials[job_id]['finished'] = True
                self.file_strategy(job_id, metrics)
        elif (status == 'Failed'):
            delete_s3_objects(self.trials[job_id]['output_path'])
    elif (job_id in self.killed_jobs):
        status = 'Stopped'
    else:
        status = 'Other'
    s = self.decode_status.get(status, _JobStatus.other)
    if (s != self.trials[job_id]['status']):
        logging.info('Jobstatus: {} for Job {}'.format(status, job_id))
    self.trials[job_id]['status'] = s
    return s