Timely interval to retrieve data from db, and stop when the data arrives
问题 I'm a newbie, so be kind :) What is the simplest solution for checking for, retrieving and using newly received data from a mysql database? The database is being updated from an external api. Ideally I would get it as it arrives but using intervals could work too. On the first iteration and then once every 5 minutes if there is no new data meanwhile - do an action with the next entry of the array which might cause data to be updated within the next 5 min. But I want to make sure to stop