Skip to content

Commit

Permalink
Revert passing request_data as argument to events.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Feb 8, 2018
1 parent 1ff64a9 commit a95f9bb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 0 additions & 5 deletions docs/release-notes/version-4.6.0.rst
Expand Up @@ -196,11 +196,6 @@ New Features
restart or shutdown. The ``--service-script`` option of ``mod_wsgi-express``
has been updated to set the number of threads to zero.

* The globally accessible per request data object accessible by calling
``mod_wsgi.request_data()``, useful for tracking request metrics etc,
is also now explicitly passed as a keyword argument to subscribed event
handlers for requests.

* Added ``mod_wsgi.active_requests`` dictionary. This is populated with the
per request data object for active requests, keyed by the Apache request ID.

Expand Down
6 changes: 6 additions & 0 deletions src/server/mod_wsgi.c
Expand Up @@ -2118,7 +2118,9 @@ static PyObject *Adapter_start_response(AdapterObject *self, PyObject *args)
PyDict_SetItemString(event, "response_headers", headers);
PyDict_SetItemString(event, "exception_info", exc_info);

#if 0
PyDict_SetItemString(event, "request_data", thread_info->request_data);
#endif

wsgi_publish_event("response_started", event);

Expand Down Expand Up @@ -3126,7 +3128,9 @@ static int Adapter_run(AdapterObject *self, PyObject *object)
PyDict_SetItemString(event, "application_start", value);
Py_DECREF(value);

#if 0
PyDict_SetItemString(event, "request_data", thread_handle->request_data);
#endif

wsgi_publish_event("request_started", event);

Expand Down Expand Up @@ -3374,7 +3378,9 @@ static int Adapter_run(AdapterObject *self, PyObject *object)
PyDict_SetItemString(event, "application_time", value);
Py_DECREF(value);

#if 0
PyDict_SetItemString(event, "request_data", thread_handle->request_data);
#endif

wsgi_publish_event("request_finished", event);

Expand Down
2 changes: 2 additions & 0 deletions src/server/wsgi_logger.c
Expand Up @@ -704,8 +704,10 @@ void wsgi_log_python_error(request_rec *r, PyObject *log,
PyDict_SetItemString(event, "exception_info", object);
Py_DECREF(object);

#if 0
PyDict_SetItemString(event, "request_data",
thread_info->request_data);
#endif

wsgi_publish_event("request_exception", event);

Expand Down

0 comments on commit a95f9bb

Please sign in to comment.