Finish event handlers when disconnecting from an event queue.

This should help prevent timeouts from clients whose requests have
been supplanted.

(imported from commit fdb3a89c4ec02bb23d0fba50ea558d48cb786916)
This commit is contained in:
Tim Abbott
2013-12-12 12:59:02 -05:00
parent 950e4c800b
commit cc0ce6b437
3 changed files with 15 additions and 4 deletions

View File

@@ -38,6 +38,10 @@ def record_request_restart_data(log_data):
log_data['bugdown_requests_restarted'] = get_bugdown_requests()
def async_request_restart(request):
if "time_restarted" in request._log_data:
# Don't destroy data when being called from
# finish_current_handler
return
record_request_restart_data(request._log_data)
def record_request_start_data(log_data):