)]}'
{"mistral/api/controllers/v2/execution.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c571f7af89b4c2cff6f6798eb659d43a270991bc","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        task_execs \u003d _get_task_executions(wf_ex.id)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        wf_published_global_vars \u003d {}"},{"line_number":123,"context_line":"        for task_ex in task_execs:"},{"line_number":124,"context_line":"            published_global_vars \u003d task.get_published_global(task_ex, wf_ex)"},{"line_number":125,"context_line":"            if published_global_vars:"},{"line_number":126,"context_line":"                merge_dicts(wf_published_global_vars, published_global_vars)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        wf_execution \u003d resources.Execution.from_db_model(wf_ex)"},{"line_number":129,"context_line":"        if wf_published_global_vars:"},{"line_number":130,"context_line":"            wf_execution.published_global \u003d wf_published_global_vars"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        return wf_execution"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_9763bd19","line":130,"range":{"start_line":122,"start_character":8,"end_line":130,"end_character":68},"updated":"2019-08-28 05:59:35.000000000","message":"Let\u0027s move this logic to a separate method (may be two methods), I suggest we avoid having too low level logic in upper level REST controller methods.","commit_id":"cfe0d45235d3e6147aaa79625e51d89aafbd9c50"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"a392e785eef2f63c72198903f525d60053feac4b","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        task_execs \u003d _get_task_executions(wf_ex.id)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        wf_published_global_vars \u003d {}"},{"line_number":123,"context_line":"        for task_ex in task_execs:"},{"line_number":124,"context_line":"            published_global_vars \u003d task.get_published_global(task_ex, wf_ex)"},{"line_number":125,"context_line":"            if published_global_vars:"},{"line_number":126,"context_line":"                merge_dicts(wf_published_global_vars, published_global_vars)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        wf_execution \u003d resources.Execution.from_db_model(wf_ex)"},{"line_number":129,"context_line":"        if wf_published_global_vars:"},{"line_number":130,"context_line":"            wf_execution.published_global \u003d wf_published_global_vars"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        return wf_execution"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_cdb76421","line":130,"range":{"start_line":122,"start_character":8,"end_line":130,"end_character":68},"in_reply_to":"7faddb67_9763bd19","updated":"2019-08-28 07:29:10.000000000","message":"Done","commit_id":"cfe0d45235d3e6147aaa79625e51d89aafbd9c50"}],"mistral/api/controllers/v2/task.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c571f7af89b4c2cff6f6798eb659d43a270991bc","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    return task"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def _load_deferred_fields(ex, fields):"},{"line_number":62,"context_line":"    if not ex:"},{"line_number":63,"context_line":"        return ex"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    # We need to refer lazy-loaded fields explicitly in"},{"line_number":66,"context_line":"    # order to make sure that they are correctly loaded."},{"line_number":67,"context_line":"    for f in fields:"},{"line_number":68,"context_line":"        hasattr(ex, f)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    return ex"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"# Use retries to prevent possible failures."}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_d77855c2","line":70,"range":{"start_line":61,"start_character":0,"end_line":70,"end_character":13},"updated":"2019-08-28 05:59:35.000000000","message":"Maybe it\u0027s time to move this utility to some common module like rest_utils.py because it\u0027s already not the first duplicate.","commit_id":"cfe0d45235d3e6147aaa79625e51d89aafbd9c50"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"a392e785eef2f63c72198903f525d60053feac4b","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    return task"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def _load_deferred_fields(ex, fields):"},{"line_number":62,"context_line":"    if not ex:"},{"line_number":63,"context_line":"        return ex"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    # We need to refer lazy-loaded fields explicitly in"},{"line_number":66,"context_line":"    # order to make sure that they are correctly loaded."},{"line_number":67,"context_line":"    for f in fields:"},{"line_number":68,"context_line":"        hasattr(ex, f)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    return ex"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"# Use retries to prevent possible failures."}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_0dbedcff","line":70,"range":{"start_line":61,"start_character":0,"end_line":70,"end_character":13},"in_reply_to":"7faddb67_d77855c2","updated":"2019-08-28 07:29:10.000000000","message":"Done","commit_id":"cfe0d45235d3e6147aaa79625e51d89aafbd9c50"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c571f7af89b4c2cff6f6798eb659d43a270991bc","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        LOG.debug(\"Fetch task [id\u003d%s]\", id)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        task, task_ex \u003d _get_task_execution(id)"},{"line_number":207,"context_line":"        published_global_vars \u003d get_published_global(task_ex)"},{"line_number":208,"context_line":"        if published_global_vars:"},{"line_number":209,"context_line":"            task.published_global \u003d published_global_vars"},{"line_number":210,"context_line":"        return task"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    @rest_utils.wrap_wsme_controller_exception"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_772e41ac","line":209,"range":{"start_line":207,"start_character":8,"end_line":209,"end_character":57},"updated":"2019-08-28 05:59:35.000000000","message":"I\u0027d refactor it with a separate method.","commit_id":"cfe0d45235d3e6147aaa79625e51d89aafbd9c50"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"a392e785eef2f63c72198903f525d60053feac4b","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        LOG.debug(\"Fetch task [id\u003d%s]\", id)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        task, task_ex \u003d _get_task_execution(id)"},{"line_number":207,"context_line":"        published_global_vars \u003d get_published_global(task_ex)"},{"line_number":208,"context_line":"        if published_global_vars:"},{"line_number":209,"context_line":"            task.published_global \u003d published_global_vars"},{"line_number":210,"context_line":"        return task"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    @rest_utils.wrap_wsme_controller_exception"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_6d3430ad","line":209,"range":{"start_line":207,"start_character":8,"end_line":209,"end_character":57},"in_reply_to":"7faddb67_772e41ac","updated":"2019-08-28 07:29:10.000000000","message":"Done","commit_id":"cfe0d45235d3e6147aaa79625e51d89aafbd9c50"}]}
