)]}'
{"mistral/api/controllers/v2/event_trigger.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"9ad6899dec327c22544bf1f6996870b8094236bc","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        with db_api.transaction():"},{"line_number":100,"context_line":"            db_api.ensure_event_trigger_exists(id)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            LOG.info(\u0027Update event trigger: [id\u003d%s, values\u003d%s]\u0027, id, values)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"            db_model \u003d triggers.update_event_trigger(id, values)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_af40e557","line":102,"range":{"start_line":102,"start_character":12,"end_line":102,"end_character":76},"updated":"2016-11-15 13:10:27.000000000","message":"IMO we shouldn\u0027t login  anything inside the transaction. After all, it\u0027s writing to file, which can take a while.","commit_id":"03a7c8a4e21f0df0d0ede8a82bb407f09f59bcc1"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"8dabaace282291ba24d5c7c92e4dc3993eb97e54","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        with db_api.transaction():"},{"line_number":100,"context_line":"            db_api.ensure_event_trigger_exists(id)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            LOG.info(\u0027Update event trigger: [id\u003d%s, values\u003d%s]\u0027, id, values)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"            db_model \u003d triggers.update_event_trigger(id, values)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_81113daf","line":102,"range":{"start_line":102,"start_character":12,"end_line":102,"end_character":76},"in_reply_to":"7a77a97e_01744d33","updated":"2016-11-15 13:23:26.000000000","message":"I think we can put it before the transaction starts.","commit_id":"03a7c8a4e21f0df0d0ede8a82bb407f09f59bcc1"},{"author":{"_account_id":22003,"name":"Xavier Hardy","email":"hardyxavier@gmail.com","username":"xavierhardy"},"change_message_id":"77be3028da01ee00d95d6120a6de0bcc8711e20b","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        with db_api.transaction():"},{"line_number":100,"context_line":"            db_api.ensure_event_trigger_exists(id)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            LOG.info(\u0027Update event trigger: [id\u003d%s, values\u003d%s]\u0027, id, values)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"            db_model \u003d triggers.update_event_trigger(id, values)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_01744d33","line":102,"range":{"start_line":102,"start_character":12,"end_line":102,"end_character":76},"in_reply_to":"7a77a97e_af40e557","updated":"2016-11-15 13:20:43.000000000","message":"So how? Because the 2 calls must be in the transaction. Should we log before doing anything?","commit_id":"03a7c8a4e21f0df0d0ede8a82bb407f09f59bcc1"}],"mistral/api/controllers/v2/task.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"9ad6899dec327c22544bf1f6996870b8094236bc","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                    \u0027Only with-items task has the option to not reset.\u0027"},{"line_number":282,"context_line":"                )"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"            rpc.get_engine_client().rerun_workflow("},{"line_number":285,"context_line":"                task_ex.id,"},{"line_number":286,"context_line":"                reset\u003dreset,"},{"line_number":287,"context_line":"                env\u003denv"},{"line_number":288,"context_line":"            )"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            task_ex \u003d db_api.get_task_execution(id)"},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_21e9491b","line":288,"range":{"start_line":284,"start_character":0,"end_line":288,"end_character":13},"updated":"2016-11-15 13:10:27.000000000","message":"This one definitely should be outside the transaction. Rerun worfklow is a sync call, so in some cases it can even last for 1 minute (this is a default timeout on RPC).","commit_id":"03a7c8a4e21f0df0d0ede8a82bb407f09f59bcc1"},{"author":{"_account_id":22003,"name":"Xavier Hardy","email":"hardyxavier@gmail.com","username":"xavierhardy"},"change_message_id":"77be3028da01ee00d95d6120a6de0bcc8711e20b","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                    \u0027Only with-items task has the option to not reset.\u0027"},{"line_number":282,"context_line":"                )"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"            rpc.get_engine_client().rerun_workflow("},{"line_number":285,"context_line":"                task_ex.id,"},{"line_number":286,"context_line":"                reset\u003dreset,"},{"line_number":287,"context_line":"                env\u003denv"},{"line_number":288,"context_line":"            )"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            task_ex \u003d db_api.get_task_execution(id)"},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_81b93dec","line":288,"range":{"start_line":284,"start_character":0,"end_line":288,"end_character":13},"in_reply_to":"7a77a97e_21e9491b","updated":"2016-11-15 13:20:43.000000000","message":"Fine with me, re-reading the code, I think we should separate those too in separate transactions anyway.","commit_id":"03a7c8a4e21f0df0d0ede8a82bb407f09f59bcc1"}]}
