{"issue":{"pull_request":{"diff_url":"https://github.com/wulczer/txpostgres/pull/9.diff","html_url":"https://github.com/wulczer/txpostgres/pull/9","patch_url":"https://github.com/wulczer/txpostgres/pull/9.patch"},"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/fcebb8e55711fd065c492617f78a0498?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"fcebb8e55711fd065c492617f78a0498","url":"https://api.github.com/users/smira","login":"smira","id":55211},"milestone":null,"labels":[],"assignee":null,"updated_at":"2011-11-12T19:35:49Z","closed_at":"2011-11-12T19:31:22Z","comments":2,"url":"https://api.github.com/repos/wulczer/txpostgres/issues/9","body":"When cursor is finished, check for incoming notifies that could have been delivered to the connection while connection hasn't been registered as reader.","html_url":"https://github.com/wulczer/txpostgres/issues/9","title":"NOTIFY could be lost until some network activity happens while using the same connection for queries and listening","number":9,"id":2206413,"created_at":"2011-11-11T05:05:14Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/76e6b8aae6b5b0c602a07828e1dbc668?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"76e6b8aae6b5b0c602a07828e1dbc668","url":"https://api.github.com/users/wulczer","login":"wulczer","id":512881},"updated_at":"2011-11-12T19:35:49Z","url":"https://api.github.com/repos/wulczer/txpostgres/issues/comments/2718974","body":"Thanks a lot, I pushed your patch, although I didn't quite like calling doRead manually, with no pending read events on the socket, so I just separated out the method checking for notifies and call it both when the reactor schedules doRead on the connection and when a cursor finishes.\r\n\r\nCome to think of it, ideally that method would be called whenever doRead is called, even if it's inside the cursor. This way you wouldn't have to wait for your long query to finish to get notify events. I guess I'll make it work like this in a follow-up commit.\r\n\r\nBy the way, all this cursor/connection/pollingmixin crap is because txpostgres was originally coded against psycopg2 where you could poll both the cursor and the connection. After the API has been decided to only make the connection pollable (which makes more sense, anyway) that slightly artificial separation lived on in txpostgres.\r\n\r\nAnyway, thanks a lot for the patch and the test case!","id":2718974,"created_at":"2011-11-12T19:35:49Z"}}