Last active
May 27, 2018 16:08
-
-
Save softwarebygabe/702d9d91b75c99300d88c426c5d24d2b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const async = require('async'); | |
function run(cb) { | |
// do some fun stuff | |
cb(); | |
} | |
async.forever( | |
(next) => { | |
run((err, res) => { | |
next(); | |
}); | |
}, | |
(err) => { | |
// There was an error that wasn't caught in run, oh no! | |
throw err; | |
}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment