Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With the log data on hand, we can then create a scheduled tasks that picked up unsuccessful API calls and attempt to trigger them again by using the following SQL (MySQL).

Code Block
languagesql
SELECT req.*, log.c_status as `latest_status` FROM app_fd_demo_request req LEFT JOIN (SELECT MAX(dateCreated) as dateCreated, c_request_id FROM app_fd_demo_request_log log GROUP BY c_request_id) a ON req.id = a.c_request_id JOIN app_fd_demo_request_log log ON log.dateCreated = a.dateCreated WHERE log.c_status != '200' ORDER BY req.dateCreated DESC