)]}'
{"doc/source/dsl/dsl_v2.rst":[{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"c76b82d866f9f93584448bdfd4f6644d92b7226d","unresolved":false,"context_lines":[{"line_number":200,"context_line":"   YAQL expression to select precisely what needs to be published."},{"line_number":201,"context_line":"   Published variables will be accessible for downstream tasks via using"},{"line_number":202,"context_line":"   YAQL expressions. *Optional*."},{"line_number":203,"context_line":"-  **publish-on-error** - Same as **publish** just evaluated in case of"},{"line_number":204,"context_line":"    task execution failures. *Optional*"},{"line_number":205,"context_line":"-  **with-items** - If configured, it allows to run action or workflow"},{"line_number":206,"context_line":"   associated with a task multiple times on a provided list of items."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a98d1f4_a45ef473","line":203,"range":{"start_line":203,"start_character":46,"end_line":203,"end_character":50},"updated":"2016-09-30 08:38:06.000000000","message":"s/just/but","commit_id":"6165bd48d7ef1694aa5bee4286da69365b631437"}],"mistral/engine/workflows.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a9a907f72785015633d63f0c755c7566079f8c15","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            return self._succeed_workflow(final_context, msg)"},{"line_number":122,"context_line":"        elif state \u003d\u003d states.ERROR:"},{"line_number":123,"context_line":"            wf_ctrl \u003d wf_base.get_controller(self.wf_ex)"},{"line_number":124,"context_line":"            final_context \u003d wf_ctrl.evaluate_workflow_final_context()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"            return self._fail_workflow(final_context, msg)"},{"line_number":127,"context_line":"        elif state \u003d\u003d states.CANCELLED:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a98d1f4_c63ffd84","line":124,"range":{"start_line":124,"start_character":28,"end_line":124,"end_character":69},"updated":"2016-10-04 11:11:33.000000000","message":"I wonder if we 1) can call this method once in the method (it\u0027s also called in case of SUCCESS) 2) need to have a similar try-except in case if it fails.\n\nMaybe it\u0027s worth creating a private method to get a final context with exception handling?","commit_id":"6c623c92b0f365cb3aa6be1430d092ffdc4de797"}],"mistral/workflow/direct_workflow.py":[{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"c76b82d866f9f93584448bdfd4f6644d92b7226d","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            try:"},{"line_number":205,"context_line":"                return not self._has_outbound_tasks(t_ex)"},{"line_number":206,"context_line":"            except exc.MistralException:"},{"line_number":207,"context_line":"                # If some error happened during evaluate outbound tasks"},{"line_number":208,"context_line":"                # we consider that the given task is an end task."},{"line_number":209,"context_line":"                # Due to this output-on-error could reach outbound context"},{"line_number":210,"context_line":"                # of given task also."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_df9f494e","line":207,"range":{"start_line":207,"start_character":48,"end_line":207,"end_character":56},"updated":"2016-09-30 08:38:06.000000000","message":"the evaluation of","commit_id":"6165bd48d7ef1694aa5bee4286da69365b631437"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"c76b82d866f9f93584448bdfd4f6644d92b7226d","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            except exc.MistralException:"},{"line_number":207,"context_line":"                # If some error happened during evaluate outbound tasks"},{"line_number":208,"context_line":"                # we consider that the given task is an end task."},{"line_number":209,"context_line":"                # Due to this output-on-error could reach outbound context"},{"line_number":210,"context_line":"                # of given task also."},{"line_number":211,"context_line":"                return True"},{"line_number":212,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_1fc1b12e","line":209,"range":{"start_line":209,"start_character":58,"end_line":209,"end_character":66},"updated":"2016-09-30 08:38:06.000000000","message":"the outbound","commit_id":"6165bd48d7ef1694aa5bee4286da69365b631437"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a9a907f72785015633d63f0c755c7566079f8c15","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            try:"},{"line_number":205,"context_line":"                return not self._has_outbound_tasks(t_ex)"},{"line_number":206,"context_line":"            except exc.MistralException:"},{"line_number":207,"context_line":"                # If some error happened during the evaluation of outbound"},{"line_number":208,"context_line":"                # tasks we consider that the given task is an end task."},{"line_number":209,"context_line":"                # Due to this output-on-error could reach the outbound context"},{"line_number":210,"context_line":"                # of given task also."},{"line_number":211,"context_line":"                return True"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        return list("}],"source_content_type":"text/x-python","patch_set":3,"id":"3a98d1f4_8b62603c","line":210,"range":{"start_line":207,"start_character":16,"end_line":210,"end_character":37},"updated":"2016-10-04 11:11:33.000000000","message":"Yes, this seems reasonable.","commit_id":"6c623c92b0f365cb3aa6be1430d092ffdc4de797"}],"mistral/workflow/lookup_utils.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a9a907f72785015633d63f0c755c7566079f8c15","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"def find_completed_tasks(wf_ex_id):"},{"line_number":108,"context_line":"    executions \u003d db_api.get_task_executions(workflow_execution_id\u003dwf_ex_id)"},{"line_number":109,"context_line":"    return ["},{"line_number":110,"context_line":"        t for t in executions if states.is_completed(t.state)"},{"line_number":111,"context_line":"    ]"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"def clean_caches():"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a98d1f4_8684155e","line":111,"range":{"start_line":108,"start_character":4,"end_line":111,"end_character":5},"updated":"2016-10-04 11:11:33.000000000","message":"Istvan, please add a special method on DB API that returns completed tasks according to some filters we pass similar to db_api.get_incomplete_task_executions(). If a workflow has hundreds (or more) of tasks then fetching all of them is expensive (e.g. on my laptop it takes up to a second if a number of tasks is 500-600). By implementing a method you can build a SQLAlchemy query (checking all needed states)  to reduce a dataset on a DB side.\n\nAlso some small things:\n* Soft: We usually use \"task_execs\" or \"wf_execs\" instead of full \"executions\". If it\u0027s only a local variable in small method then \"execs\" would be enough.\n* Soft: We usually put blank lines before all control structures like \"for\", \"return\", \"try\".","commit_id":"6c623c92b0f365cb3aa6be1430d092ffdc4de797"}],"mistral/workflow/reverse_workflow.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a9a907f72785015633d63f0c755c7566079f8c15","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        if len(task_execs) \u003d\u003d 1:"},{"line_number":113,"context_line":"            return data_flow.evaluate_task_outbound_context(task_execs[0])"},{"line_number":114,"context_line":"        else:"},{"line_number":115,"context_line":"            return {}"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def get_logical_task_state(self, task_ex):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a98d1f4_c6f1bd02","line":114,"range":{"start_line":114,"start_character":8,"end_line":114,"end_character":12},"updated":"2016-10-04 11:11:33.000000000","message":"Soft: I would remove \u0027else\u0027 here and reduce the indent of line 115.","commit_id":"6c623c92b0f365cb3aa6be1430d092ffdc4de797"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"9d17d129abd3c59f3978fda42d691a0ce39f8f0d","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        if len(task_execs) \u003d\u003d 1:"},{"line_number":113,"context_line":"            return data_flow.evaluate_task_outbound_context(task_execs[0])"},{"line_number":114,"context_line":"        else:"},{"line_number":115,"context_line":"            return {}"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def get_logical_task_state(self, task_ex):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a98d1f4_260a6126","line":114,"range":{"start_line":114,"start_character":8,"end_line":114,"end_character":12},"in_reply_to":"3a98d1f4_c6f1bd02","updated":"2016-10-04 11:25:55.000000000","message":"I rather agree with Istvan in this style. This way, it is clean that else is not just a case but but that these are the only options for returning data. Additionally, this style generally makes it harder to accidentally add code where not intended.","commit_id":"6c623c92b0f365cb3aa6be1430d092ffdc4de797"}]}
