Skip to content

[FRAME-176]: Delay Events Until Shutdown#84

Merged
tarecord merged 8 commits into
developfrom
feature/delayed-event-requests
Sep 25, 2023
Merged

[FRAME-176]: Delay Events Until Shutdown#84
tarecord merged 8 commits into
developfrom
feature/delayed-event-requests

Conversation

@tarecord
Copy link
Copy Markdown
Member

@tarecord tarecord commented Sep 1, 2023

This adds functionality to cache all events for the request until the shutdown action. Then during shutdown each event request is sent in a similar fashion to how we send the telemetry data.

  1. A request is sent to the ajax endpoint
  2. A new request is created during the ajax request to actually send the event to the server

This should keep the user from needing to wait for the requests to send, but it does not prevent the server from being overloaded if a plugin sends a large number of requests on each page load.

Use the same process for hooking into the "shutdown" action and spin off
async requests for sending each cached event to the telemetry server.
Copy link
Copy Markdown
Contributor

@ChrisMKindred ChrisMKindred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great first step to the fix. The lift would be very low to add an events endpoint to the server and send all the events in one request. As rare as it might be, the event cache could be large, and calling an admin-ajax request for each is inefficient.

@tarecord tarecord merged commit dead016 into develop Sep 25, 2023
@tarecord tarecord deleted the feature/delayed-event-requests branch September 25, 2023 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants