def register_task(self, task_def):
        '''
        Register a task for a python dict
        :param task_def: dict defining gbdx task
        '''
        r = self.session.post(
            self.task_url,
            data=task_def,
            headers={'Content-Type': 'application/json', 'Accept': 'application/json'}
        )

        task_dict = json.loads(task_def)

        if r.status_code == 200:
            return r.status_code, 'Task %s registered' % task_dict['name']
        else:
            return r.status_code, 'Task %s was not registered: %s' % (task_dict['name'], r.text)
def register_task(self, task_def):
        '''
        Register a task for a python dict
        :param task_def: dict defining gbdx task
        '''
        r = self.session.post(
            self.task_url,
            data=task_def,
            headers={'Content-Type': 'application/json', 'Accept': 'application/json'}
        )

        task_dict = json.loads(task_def)

        if r.status_code == 200:
            return r.status_code, 'Task %s registered' % task_dict['name']
        else:
            return r.status_code, 'Task %s was not registered: %s' % (task_dict['name'], r.text)
def register_task ( self , task_def ) : r = self . session . post ( self . task_url , data = task_def , headers = { 'Content-Type' : 'application/json' , 'Accept' : 'application/json' } ) task_dict = json . loads ( task_def ) if r . status_code == 200 : return r . status_code , 'Task %s registered' % task_dict [ 'name' ] else : return r . status_code , 'Task %s was not registered: %s' % ( task_dict [ 'name' ] , r . text )
Register a task for a python dict
        :param task_def: dict defining gbdx task
Register a task for a python dict : param task_def : dict defining gbdx task