{"comment":{"created_at":"2011-10-14T19:15:36Z","body":"One possible cause is that every time an interact change is detected, a request is set to the server, so we shouldn't prevent any subsequent requests, we should just make sure that the sequence numbers match up with what the JS expects - instead of a warning on line 209 of compute_server.js, there should probably be better error handling or checking for errors.","updated_at":"2011-10-14T19:15:36Z","url":"https://api.github.com/repos/jasongrout/simple-python-db-compute/issues/comments/2410325","id":2410325,"user":{"avatar_url":"https://secure.gravatar.com/avatar/308fdcd1a3e206a59934b68efc554902?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"308fdcd1a3e206a59934b68efc554902","url":"https://api.github.com/users/kramer314","id":780053,"login":"kramer314"}},"action":"created","issue":{"number":166,"created_at":"2011-07-30T06:18:12Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Here is the message stream.  The result is that the output contains *two* lines that say the test number is 12:\r\n\r\nMy guess is that the problem is that two requests are sent for the last n messages because of timeouts, and when they both get back, both are processed.  Instead, sequence numbers we've already seen should be ignored.\r\n\r\nThanks to Karl-Dieter Crisman for reporting this.\r\n\r\nAccepted: {\"parent_header\":{\"username\":\"\",\"msg_id\":\"a9de96e2-98c9-4991-97f7-2b69d6664a51\",\"session\":\"7457c7dc-88d5-452d-8ba5-98759c3c4167\"},\"msg_type\":\"extension\",\"sequence\":0,\"output_block\":null,\"content\":{\"content\":{\"interact_id\":\"6222333474689003747\",\"layout\":{\"top_center\":[]},\"update\":{},\"controls\":{}},\"msg_type\":\"interact_prepare\"},\"header\":{\"msg_id\":\"957954863989637915\"}}\r\nAccepted: {\"parent_header\":{\"username\":\"\",\"msg_id\":\"a9de96e2-98c9-4991-97f7-2b69d6664a51\",\"session\":\"7457c7dc-88d5-452d-8ba5-98759c3c4167\"},\"msg_type\":\"display_data\",\"sequence\":1,\"output_block\":\"6222333474689003747\",\"content\":{\"data\":{\"text/html\":\"<font\r\ncolor='black'>This is a\r\ntest</font>\"}},\"header\":{\"msg_id\":\"6232588629955596838\"}}\r\nAccepted: {\"parent_header\":{\"username\":\"\",\"msg_id\":\"a9de96e2-98c9-4991-97f7-2b69d6664a51\",\"session\":\"7457c7dc-88d5-452d-8ba5-98759c3c4167\"},\"msg_type\":\"execute_reply\",\"sequence\":2,\"output_block\":null,\"content\":{\"status\":\"ok\"},\"header\":{\"msg_id\":\"8301150123388769332\"}}\r\nAccepted: {\"parent_header\":{\"username\":\"\",\"msg_id\":\"da6c8846-26a7-450d-a66d-954ea9116f74\",\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\"},\"msg_type\":\"extension\",\"sequence\":0,\"output_block\":null,\"content\":{\"content\":{\"interact_id\":\"692870008773933146\",\"layout\":{\"top_center\":[[\"n\"]]},\"update\":{\"n\":\"n\"},\"controls\":{\"n\":{\"control_type\":\"input_box\",\"subtype\":\"input\",\"default\":\"5\",\"label\":null,\"raw\":true,\"height\":1,\"width\":0}}},\"msg_type\":\"interact_prepare\"},\"header\":{\"msg_id\":\"3441319911034409976\"}}\r\nAccepted: {\"parent_header\":{\"username\":\"\",\"msg_id\":\"da6c8846-26a7-450d-a66d-954ea9116f74\",\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\"},\"msg_type\":\"display_data\",\"sequence\":1,\"output_block\":\"692870008773933146\",\"content\":{\"data\":{\"text/html\":\"<font\r\ncolor='black'>This is my test number <span\r\nclass=\\\"math\\\">5</span></font>\"}},\"header\":{\"msg_id\":\"3384533064295416361\"}}\r\nAccepted: {\"parent_header\":{\"username\":\"\",\"msg_id\":\"da6c8846-26a7-450d-a66d-954ea9116f74\",\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\"},\"msg_type\":\"execute_reply\",\"sequence\":2,\"output_block\":null,\"content\":{\"status\":\"ok\"},\"header\":{\"msg_id\":\"8858079997728407892\"}}\r\n*******SEND: {\"parent_header\":{},\"header\":{\"msg_id\":\"43d9a4f4-5dad-4fd6-a8b8-e2856b73834c\",\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\"},\"msg_type\":\"execute_request\",\"content\":{\"code\":\"_update_interact('692870008773933146',control_vals=dict(n=6,))\",\"sage_mode\":true}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"43d9a4f4-5dad-4fd6-a8b8-e2856b73834c\"},\"msg_type\":\"display_data\",\"sequence\":3,\"output_block\":\"692870008773933146\",\"content\":{\"data\":{\"text/html\":\"<font\r\ncolor='black'>This is my test number <span\r\nclass=\\\"math\\\">6</span></font>\"}},\"header\":{\"msg_id\":\"711775579915974976\"}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"43d9a4f4-5dad-4fd6-a8b8-e2856b73834c\"},\"msg_type\":\"execute_reply\",\"sequence\":4,\"output_block\":null,\"content\":{\"status\":\"ok\"},\"header\":{\"msg_id\":\"3416245233944641852\"}}\r\n*******SEND: {\"parent_header\":{},\"header\":{\"msg_id\":\"48e25a0b-b740-4f9d-8365-7338887d6b68\",\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\"},\"msg_type\":\"execute_request\",\"content\":{\"code\":\"_update_interact('692870008773933146',control_vals=dict(n=7,))\",\"sage_mode\":true}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"48e25a0b-b740-4f9d-8365-7338887d6b68\"},\"msg_type\":\"display_data\",\"sequence\":5,\"output_block\":\"692870008773933146\",\"content\":{\"data\":{\"text/html\":\"<font\r\ncolor='black'>This is my test number <span\r\nclass=\\\"math\\\">7</span></font>\"}},\"header\":{\"msg_id\":\"4665300269252096011\"}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"48e25a0b-b740-4f9d-8365-7338887d6b68\"},\"msg_type\":\"execute_reply\",\"sequence\":6,\"output_block\":null,\"content\":{\"status\":\"ok\"},\"header\":{\"msg_id\":\"997305842455556656\"}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"48e25a0b-b740-4f9d-8365-7338887d6b68\"},\"msg_type\":\"display_data\",\"sequence\":5,\"output_block\":\"692870008773933146\",\"content\":{\"data\":{\"text/html\":\"<font\r\ncolor='black'>This is my test number <span\r\nclass=\\\"math\\\">7</span></font>\"}},\"header\":{\"msg_id\":\"4665300269252096011\"}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"48e25a0b-b740-4f9d-8365-7338887d6b68\"},\"msg_type\":\"execute_reply\",\"sequence\":6,\"output_block\":null,\"content\":{\"status\":\"ok\"},\"header\":{\"msg_id\":\"997305842455556656\"}}\r\n*******SEND: {\"parent_header\":{},\"header\":{\"msg_id\":\"c7e55073-ddc1-43d5-b659-fd9787be1927\",\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\"},\"msg_type\":\"execute_request\",\"content\":{\"code\":\"_update_interact('692870008773933146',control_vals=dict(n=9,))\",\"sage_mode\":true}}\r\n*******SEND: {\"parent_header\":{},\"header\":{\"msg_id\":\"67c6d09e-be3a-40a4-80e3-e0e1563013ea\",\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\"},\"msg_type\":\"execute_request\",\"content\":{\"code\":\"_update_interact('692870008773933146',control_vals=dict(n=11,))\",\"sage_mode\":true}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"67c6d09e-be3a-40a4-80e3-e0e1563013ea\"},\"msg_type\":\"display_data\",\"sequence\":9,\"output_block\":\"692870008773933146\",\"content\":{\"data\":{\"text/html\":\"<font\r\ncolor='black'>This is my test number <span\r\nclass=\\\"math\\\">11</span></font>\"}},\"header\":{\"msg_id\":\"7659352876726826311\"}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"67c6d09e-be3a-40a4-80e3-e0e1563013ea\"},\"msg_type\":\"execute_reply\",\"sequence\":10,\"output_block\":null,\"content\":{\"status\":\"ok\"},\"header\":{\"msg_id\":\"6738067496376930900\"}}\r\n*******SEND: {\"parent_header\":{},\"header\":{\"msg_id\":\"8aa2c2be-c4a0-4925-b1da-c8623e2a9e94\",\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\"},\"msg_type\":\"execute_request\",\"content\":{\"code\":\"_update_interact('692870008773933146',control_vals=dict(n=12,))\",\"sage_mode\":true}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"8aa2c2be-c4a0-4925-b1da-c8623e2a9e94\"},\"msg_type\":\"display_data\",\"sequence\":11,\"output_block\":\"692870008773933146\",\"content\":{\"data\":{\"text/html\":\"<font\r\ncolor='black'>This is my test number <span\r\nclass=\\\"math\\\">12</span></font>\"}},\"header\":{\"msg_id\":\"7799078406502737865\"}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"8aa2c2be-c4a0-4925-b1da-c8623e2a9e94\"},\"msg_type\":\"execute_reply\",\"sequence\":12,\"output_block\":null,\"content\":{\"status\":\"ok\"},\"header\":{\"msg_id\":\"724211074111524938\"}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"8aa2c2be-c4a0-4925-b1da-c8623e2a9e94\"},\"msg_type\":\"display_data\",\"sequence\":11,\"output_block\":\"692870008773933146\",\"content\":{\"data\":{\"text/html\":\"<font\r\ncolor='black'>This is my test number <span\r\nclass=\\\"math\\\">12</span></font>\"}},\"header\":{\"msg_id\":\"7799078406502737865\"}}\r\nAccepted: {\"parent_header\":{\"session\":\"9e050e09-6e3d-4561-b11a-56395830d4dc\",\"msg_id\":\"8aa2c2be-c4a0-4925-b1da-c8623e2a9e94\"},\"msg_type\":\"execute_reply\",\"sequence\":12,\"output_block\":null,\"content\":{\"status\":\"ok\"},\"header\":{\"msg_id\":\"724211074111524938\"}}\r\nAccepted: {\"parent_header\":{\"session\":\"7457c7dc-88d5-452d-8ba5-98759c3c4167\"},\"msg_type\":\"extension\",\"sequence\":3,\"content\":{\"msg_type\":\"session_end\"},\"header\":{\"msg_id\":\"d31c8e96-08de-46ca-82cc-94305ce18793\"}}\r\n","comments":1,"title":"multiple interact output showing up","updated_at":"2011-10-14T19:15:36Z","url":"https://api.github.com/repos/jasongrout/simple-python-db-compute/issues/166","id":1314228,"assignee":null,"milestone":{"number":3,"created_at":"2011-07-01T17:59:11Z","due_on":null,"title":"High Priority","creator":{"avatar_url":"https://secure.gravatar.com/avatar/308fdcd1a3e206a59934b68efc554902?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"308fdcd1a3e206a59934b68efc554902","url":"https://api.github.com/users/kramer314","id":780053,"login":"kramer314"},"url":"https://api.github.com/repos/jasongrout/simple-python-db-compute/milestones/3","open_issues":12,"closed_issues":5,"description":"Things that are urgent or critical. These issues should also be tagged as \"urgent.\"","state":"open"},"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/40b0e88ab4c6bcc356a4043b0b49391a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"40b0e88ab4c6bcc356a4043b0b49391a","url":"https://api.github.com/users/jasongrout","id":192614,"login":"jasongrout"},"html_url":"https://github.com/jasongrout/simple-python-db-compute/issues/166","labels":[{"name":"interacts","url":"https://api.github.com/repos/jasongrout/simple-python-db-compute/labels/interacts","color":"e102d8"},{"name":"javascript","url":"https://api.github.com/repos/jasongrout/simple-python-db-compute/labels/javascript","color":"02d7e1"}],"state":"open"},"legacy":{"issue_id":1314228,"comment_id":2410325}}