)]}'
{"mistral/engine/workflow_handler.py":[{"author":{"_account_id":9029,"name":"Moshe Elisha","email":"moshe.elisha@nokia.com","username":"MosheElisha"},"change_message_id":"2909a084484b626153c50c08aa55a6aa5383b271","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        if not states.is_completed(wf_ex.state):"},{"line_number":105,"context_line":"            # TODO(rakhmerov): Moving forward we can implement some more fancy"},{"line_number":106,"context_line":"            # algorithm for increasing delay for rescheduling."},{"line_number":107,"context_line":"            delay \u003d 2"},{"line_number":108,"context_line":"            schedule_on_task_complete(task_ex, delay)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_9bd686c1","line":107,"updated":"2016-08-04 11:10:20.000000000","message":"Why not delay 1 or even 0?","commit_id":"af1dec44df8b0ec9d2ff2f7a408f467cd5e8d1d0"},{"author":{"_account_id":9029,"name":"Moshe Elisha","email":"moshe.elisha@nokia.com","username":"MosheElisha"},"change_message_id":"2909a084484b626153c50c08aa55a6aa5383b271","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    This method provides transactional decoupling of task completion from"},{"line_number":169,"context_line":"    workflow completion check. It\u0027s needed in non-locking model in order to"},{"line_number":170,"context_line":"    avoid \u0027phantom read\u0027 phenomena when reading state of multiple tasks"},{"line_number":171,"context_line":"    to see if a workflow is completed."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    :param task_ex: Task execution."},{"line_number":174,"context_line":"    :param delay: Minimum amount of time before task completion check"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_1ed3a460","line":171,"updated":"2016-08-04 11:10:20.000000000","message":"Maybe also elaborate on why not simply to do another transaction","commit_id":"af1dec44df8b0ec9d2ff2f7a408f467cd5e8d1d0"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"cc73e3ed4d28555414b9a55e39de4b9effee6277","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            return"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        if not states.is_completed(wf_ex.state):"},{"line_number":105,"context_line":"            # TODO(rakhmerov): Moving forward we can implement some more fancy"},{"line_number":106,"context_line":"            # algorithm for increasing delay for rescheduling so that we don\u0027t"},{"line_number":107,"context_line":"            # put too serious load onto scheduler."},{"line_number":108,"context_line":"            delay \u003d 1"},{"line_number":109,"context_line":"            schedule_on_task_complete(task_ex, delay)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def pause_workflow(wf_ex, msg\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_8aabce1d","line":109,"range":{"start_line":104,"start_character":8,"end_line":109,"end_character":53},"updated":"2016-08-04 12:44:34.000000000","message":"If I understand correctly, this method will schedule on_task_complete again and again for all tasks in all running workflows. Thus, then we will have many delayed calls for 1 workflows (they are scheduled after each task completes). \n\nIf so, wouldn\u0027t it be better to schedule only one delayed call for each workflow with its unique key?","commit_id":"2cdec1c51ab4c6af3face2b3a0f9d26e85e505ac"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"cc73e3ed4d28555414b9a55e39de4b9effee6277","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    :param delay: Minimum amount of time before task completion check"},{"line_number":179,"context_line":"        should be made."},{"line_number":180,"context_line":"    \"\"\""},{"line_number":181,"context_line":"    key \u003d \u0027wfh_on_t_c-%s\u0027 % task_ex.workflow_execution_id"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    scheduler.schedule_call("},{"line_number":184,"context_line":"        None,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_18057510","line":181,"range":{"start_line":181,"start_character":4,"end_line":181,"end_character":57},"updated":"2016-08-04 12:44:34.000000000","message":"Ok, forgive my comment above :) \n\nNow I see: Creating of all delayed calls except for 1 will be ignored. So we will have only 1 scheduled check at a time.","commit_id":"2cdec1c51ab4c6af3face2b3a0f9d26e85e505ac"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"822981178b1236d7c37bc14c18051d01ae66a497","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    :param delay: Minimum amount of time before task completion check"},{"line_number":179,"context_line":"        should be made."},{"line_number":180,"context_line":"    \"\"\""},{"line_number":181,"context_line":"    key \u003d \u0027wfh_on_t_c-%s\u0027 % task_ex.workflow_execution_id"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    scheduler.schedule_call("},{"line_number":184,"context_line":"        None,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_ce3c9395","line":181,"range":{"start_line":181,"start_character":4,"end_line":181,"end_character":57},"in_reply_to":"bacf61ea_18057510","updated":"2016-08-05 03:50:59.000000000","message":"Yes, this is correct :)","commit_id":"2cdec1c51ab4c6af3face2b3a0f9d26e85e505ac"}]}
