Running on shell via multiprocessing.

def worker(data):
    """Running on shell via multiprocessing."""
    creator = get_creator_by_name(data['creator'])
    shell = creator(data['entry'],
                    ShellConfig(script=data['entry']['script'],
                                title=data['entry']['title'] if 'title' in data['entry'] else '',
                                model=data['model'], env=data['env'], item=data['item'],
                                dry_run=data['dry_run'], debug=data['debug'], strict=data['strict'],
                                variables=data['variables'],
                                temporary_scripts_path=data['temporary_scripts_path']))
    output = []
    for line in shell.process():
        output.append(line)
        Logger.get_logger(__name__ + '.worker').info(" | %s", line)
    return {'id': data['id'], 'success': shell.success, 'output': output}