You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both event-bus-kafka and event-bus-redis call a _reconnect_to_db_if_needed function before processing each event. This ensures that the database connection is in a good state before work begins. In a normal request-driven environment, this would automatically be handled by Django.
We're also adding a call to clear the request cache in event-bus-kafka, in case there are signal receivers that would normally be called in a request context and that rely on the request cache.
openedx-events should probably host a utility function that can be called from each implementation's consume loop in order to generically reset the application state for each new event that needs to be processed. (Also see #236 for the possibility of more general request-like resetting.)
The text was updated successfully, but these errors were encountered:
Just making it extra clear that "clear the request cache" still needs to be added to event-bus-redis, and this ticket would be a great way to get this change and future changes as well. Of course, with this change, someone would also want to retrofit event-bus-kafka to use the shared implementation.
Both event-bus-kafka and event-bus-redis call a
_reconnect_to_db_if_needed
function before processing each event. This ensures that the database connection is in a good state before work begins. In a normal request-driven environment, this would automatically be handled by Django.We're also adding a call to clear the request cache in event-bus-kafka, in case there are signal receivers that would normally be called in a request context and that rely on the request cache.
openedx-events should probably host a utility function that can be called from each implementation's consume loop in order to generically reset the application state for each new event that needs to be processed. (Also see #236 for the possibility of more general request-like resetting.)
The text was updated successfully, but these errors were encountered: