'Sumbit job to GoDocker and return jobid
Create Job model schema of GoDocker and call the http_post_request method.'

def post_task(self, job_wrapper):

    if self.auth.token:
        job_destination = job_wrapper.job_destination
        try:
            docker_cpu = int(job_destination.params['docker_cpu'])
        except:
            docker_cpu = 1
        try:
            docker_ram = int(job_destination.params['docker_memory'])
        except:
            docker_ram = 1
        try:
            docker_image = self._find_container(job_wrapper).container_id
            log.debug('GoDocker    runner    using    container    %s.', docker_image)
        except:
            log.error(('Unable    to    find    docker_image    for    job    %s,    failing.' % job_wrapper.job_id))
            return False
        volumes = []
        labels = []
        tags_tab = ['galaxy', job_wrapper.tool.id]
        tasks_depends = []
        name = job_wrapper.tool.name
        description = 'galaxy    job'
        array = None
        project = None
        try:
            project = str(self.runner_params['godocker_project'])
        except KeyError:
            log.debug('godocker_project    not    defined,    using    default.')
        try:
            volume = job_destination.params['godocker_volumes']
            volume = volume.split(',')
            for i in volume:
                temp = dict({'name': i})
                volumes.append(temp)
        except:
            log.debug('godocker_volume    not    set,    using    default.')
        dt = datetime.now()
        try:
            if (job_destination.params['virtualenv'] == 'true'):
                GALAXY_VENV_TEMPLATE = 'GALAXY_VIRTUAL_ENV="%s";    if    [    "$GALAXY_VIRTUAL_ENV"    !=    "None"    -a    -z    "$VIRTUAL_ENV"    -a    -f    "$GALAXY_VIRTUAL_ENV/bin/activate"    ];    then    .    "$GALAXY_VIRTUAL_ENV/bin/activate";    fi;'
                venv = (GALAXY_VENV_TEMPLATE % job_wrapper.galaxy_virtual_env)
                command = (((((('#!/bin/bash\n' + 'cd    ') + job_wrapper.working_directory) + '\n') + venv) + '\n') + job_wrapper.runner_command_line)
            else:
                command = (((('#!/bin/bash\n' + 'cd    ') + job_wrapper.working_directory) + '\n') + job_wrapper.runner_command_line)
        except:
            command = (((('#!/bin/bash\n' + 'cd    ') + job_wrapper.working_directory) + '\n') + job_wrapper.runner_command_line)
        job = {'date': time.mktime(dt.timetuple()), 'meta': {'name': name, 'description': description, 'tags': tags_tab}, 'requirements': {'cpu': docker_cpu, 'ram': docker_ram, 'array': {'values': array}, 'label': labels, 'tasks': tasks_depends, 'tmpstorage': None}, 'container': {'image': str(docker_image), 'volumes': volumes, 'network': True, 'id': None, 'meta': None, 'stats': None, 'ports': [], 'root': False}, 'command': {'interactive': False, 'cmd': command}, 'status': {'primary': None, 'secondary': None}}
        if (project is not None):
            job['user'] = {'project': project}
        result = self.auth.http_post_request('/api/1.0/task', json.dumps(job), {'Authorization': ('Bearer    ' + self.auth.token), 'Content-type': 'application/json', 'Accept': 'application/json'})
        return str(result.json()['id'])
