I'm a noob Nodejs developer. I've written an app that gets a list of URLs from a DB table and scrape them. It then goes over those URLs and inserts into another table the results. when I run the app it never quits (I'm assuming it because the MySQL connection never ends by me) but when I call con.end() (using a pool) it then throws an error since it's still working.
How can I determine when I can close the connection pool? promise all doesn't cut it cause sometimes I have rejections but its still ok by me. help :-)