This creates a service which calls the repository on webhook requests to get list of requests since date provided which have not yet succeeded. This then add the request to event dispatcher.
I had to write code to spin off Doctrine Entity Manager in this to be able to test the repository method.
The query to get list of failed requests is as below with EXPLAIN.
The explain is from database which had 60k webhook responses and 20k webhook requests.
SELECT q.id FROMevent_activity_requestsq WHERE q.id NOT IN(SELECT DISTINCT(s.request_id) FROMevent_activity_responsess WHERE s.status_code = 200) AND q.created_at >= '2019-06-10 00:00:00';
Ticket here
This creates a service which calls the repository on webhook requests to get list of requests since date provided which have not yet succeeded. This then add the request to event dispatcher.
I had to write code to spin off Doctrine Entity Manager in this to be able to test the repository method.
The query to get list of failed requests is as below with EXPLAIN.
The explain is from database which had 60k webhook responses and 20k webhook requests.
SELECT q.id FROM
event_activity_requestsq WHERE q.id NOT IN(SELECT DISTINCT(s.request_id) FROM
event_activity_responsess WHERE s.status_code = 200) AND q.created_at >= '2019-06-10 00:00:00';