Thursday 9 November 2017

Why isn't my async.forEachOf TIMEOUT functioning properly??

I'm a terrible programmer and another poster here helped me create this async...But, the timeout doesn't work! It still fires all the API calls off immediately.... HELP!!Should be an easy fix... for YOU... but... not for me!!!!async.forEachOf(array, (url, key, cbURLs) => {app.models.predict("c0c0ac362b03416da06ab3fa36fb58e3", url).then(function(response) {console.log(JSON.stringify(response)); }, function(err) { console.error(err); } );setTimeout(() => {cbURLs();}, 150000000000000 + (1500* key));}, (err) => { if(err) console.log(err);});

Submitted November 09, 2017 at 04:33PM by PostNationalism

No comments:

Post a Comment