)]}'
{"mistral/engine/default_engine.py":[{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"03b2c4763d693ab5603fab0a663a943db5c885d8","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                if states.is_paused_or_completed(wf_ex.state):"},{"line_number":252,"context_line":"                    return action_ex.get_clone()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"            task_state \u003d task_ex.state"},{"line_number":255,"context_line":"            # Separate the task transition in a separate transaction. The task"},{"line_number":256,"context_line":"            # has already completed for better or worst. The task state should"},{"line_number":257,"context_line":"            # not be affected by errors during transition on conditions such as"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_2dd0ea1e","line":254,"range":{"start_line":254,"start_character":12,"end_line":254,"end_character":22},"updated":"2016-01-29 00:56:55.000000000","message":"Please use more meaningful name like prev_task_state\nAlso I think this approach can create race condition.","commit_id":"bad0f2c9e123aed8fd74c81ddbf367f67a9278d8"},{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"1ff952b4c574cb38077af1fa170009acd2fdf7ff","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                if states.is_paused_or_completed(wf_ex.state):"},{"line_number":252,"context_line":"                    return action_ex.get_clone()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"            task_state \u003d task_ex.state"},{"line_number":255,"context_line":"            # Separate the task transition in a separate transaction. The task"},{"line_number":256,"context_line":"            # has already completed for better or worst. The task state should"},{"line_number":257,"context_line":"            # not be affected by errors during transition on conditions such as"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_c816e4a6","line":254,"range":{"start_line":254,"start_character":12,"end_line":254,"end_character":22},"in_reply_to":"7a5de9d1_2dd0ea1e","updated":"2016-01-29 01:38:16.000000000","message":"\u003e\u003e\u003eAlso I think this approach can create race condition.\nPlease ignore this. I understand.","commit_id":"bad0f2c9e123aed8fd74c81ddbf367f67a9278d8"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"66792fe871c7ca214c001ac8fab07a070030f123","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                if states.is_paused_or_completed(wf_ex.state):"},{"line_number":252,"context_line":"                    return action_ex.get_clone()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"            task_state \u003d task_ex.state"},{"line_number":255,"context_line":"            # Separate the task transition in a separate transaction. The task"},{"line_number":256,"context_line":"            # has already completed for better or worst. The task state should"},{"line_number":257,"context_line":"            # not be affected by errors during transition on conditions such as"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_55eb64b0","line":254,"range":{"start_line":254,"start_character":12,"end_line":254,"end_character":22},"in_reply_to":"7a5de9d1_c816e4a6","updated":"2016-01-29 07:54:24.000000000","message":"Done","commit_id":"bad0f2c9e123aed8fd74c81ddbf367f67a9278d8"},{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"03b2c4763d693ab5603fab0a663a943db5c885d8","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                wf_ex \u003d self._lock_workflow_execution("},{"line_number":263,"context_line":"                    task_ex.workflow_execution_id"},{"line_number":264,"context_line":"                )"},{"line_number":265,"context_line":"                self._on_task_state_change(task_ex,"},{"line_number":266,"context_line":"                                           wf_ex,"},{"line_number":267,"context_line":"                                           task_state\u003dtask_state)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"                return action_ex.get_clone()"},{"line_number":270,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_4f9afe64","line":267,"range":{"start_line":265,"start_character":16,"end_line":267,"end_character":65},"updated":"2016-01-29 00:56:55.000000000","message":"PLease use\nself._on_task_state_change(\n    task_ex,\n    wf_ex,\n    task_state\u003dtask_state\n)","commit_id":"bad0f2c9e123aed8fd74c81ddbf367f67a9278d8"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"66792fe871c7ca214c001ac8fab07a070030f123","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                wf_ex \u003d self._lock_workflow_execution("},{"line_number":263,"context_line":"                    task_ex.workflow_execution_id"},{"line_number":264,"context_line":"                )"},{"line_number":265,"context_line":"                self._on_task_state_change(task_ex,"},{"line_number":266,"context_line":"                                           wf_ex,"},{"line_number":267,"context_line":"                                           task_state\u003dtask_state)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"                return action_ex.get_clone()"},{"line_number":270,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_f5d290ff","line":267,"range":{"start_line":265,"start_character":16,"end_line":267,"end_character":65},"in_reply_to":"7a5de9d1_4f9afe64","updated":"2016-01-29 07:54:24.000000000","message":"Done","commit_id":"bad0f2c9e123aed8fd74c81ddbf367f67a9278d8"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6f76b77cbee609b4d1308737ba4c8ee330c91466","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        task_spec \u003d spec_parser.get_task_spec(task_ex.spec)"},{"line_number":175,"context_line":"        wf_spec \u003d spec_parser.get_workflow_spec(wf_ex.spec)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        # we must be sure that if task is completed,"},{"line_number":178,"context_line":"        # it was also completed in previous transaction"},{"line_number":179,"context_line":"        if task_handler.is_task_completed(task_ex, task_spec)\\"},{"line_number":180,"context_line":"                and states.is_completed(task_state):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_8422c2a1","line":177,"range":{"start_line":177,"start_character":20,"end_line":177,"end_character":21},"updated":"2016-02-01 08:25:29.000000000","message":"Soft: all comments should start with capital and end with a period.","commit_id":"3ef809fdb24733c50643c2725d5d3084d5255597"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"785461fcf60ed8656667874a360a8775440bc24d","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        # we must be sure that if task is completed,"},{"line_number":178,"context_line":"        # it was also completed in previous transaction"},{"line_number":179,"context_line":"        if task_handler.is_task_completed(task_ex, task_spec)\\"},{"line_number":180,"context_line":"                and states.is_completed(task_state):"},{"line_number":181,"context_line":"            task_handler.after_task_complete(task_ex, task_spec, wf_spec)"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_64b3060b","line":179,"range":{"start_line":179,"start_character":52,"end_line":179,"end_character":62},"updated":"2016-02-01 08:42:41.000000000","message":"please use parentheses instead of backslash: \n\n  if (task_handler.is_task_completed(task_ex, task_spec)\n         and states.is_completed(task_state) ):","commit_id":"3ef809fdb24733c50643c2725d5d3084d5255597"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"785461fcf60ed8656667874a360a8775440bc24d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        # we must be sure that if task is completed,"},{"line_number":178,"context_line":"        # it was also completed in previous transaction"},{"line_number":179,"context_line":"        if task_handler.is_task_completed(task_ex, task_spec)\\"},{"line_number":180,"context_line":"                and states.is_completed(task_state):"},{"line_number":181,"context_line":"            task_handler.after_task_complete(task_ex, task_spec, wf_spec)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"            # Ignore DELAYED state."}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_a4981e1d","line":180,"range":{"start_line":180,"start_character":16,"end_line":180,"end_character":51},"updated":"2016-02-01 08:42:41.000000000","message":"I have another idea: the end of the condition can be moved right to task_handler.is_task_completed function. What do you think?","commit_id":"3ef809fdb24733c50643c2725d5d3084d5255597"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"2807febe623564a432aa0e7e671145606ac6e03a","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        # we must be sure that if task is completed,"},{"line_number":178,"context_line":"        # it was also completed in previous transaction"},{"line_number":179,"context_line":"        if task_handler.is_task_completed(task_ex, task_spec)\\"},{"line_number":180,"context_line":"                and states.is_completed(task_state):"},{"line_number":181,"context_line":"            task_handler.after_task_complete(task_ex, task_spec, wf_spec)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"            # Ignore DELAYED state."}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_99e6a4e6","line":180,"range":{"start_line":180,"start_character":16,"end_line":180,"end_character":51},"in_reply_to":"7a5de9d1_a4981e1d","updated":"2016-02-01 12:04:40.000000000","message":"I am not sure if it\u0027s a good idea since task_handler.is_task_completed checks if given task is ended at the time it is called. In this case we want to check not only if it is ended right now, but also, if it was ended in previous transaction.\n\nI was rather thinking if it is possible to delete the first part of the \u0027if\u0027 statement, so it will look like this:\nif states.is_completed(task_state),\nsince if it was completed in previous transaction, some magic would happen if it wasn\u0027t completed in second transaction, am I right?","commit_id":"3ef809fdb24733c50643c2725d5d3084d5255597"}]}
