Last active
June 2, 2016 20:35
-
-
Save jherdman/4090d7f71eacd4fba22726fa77359e72 to your computer and use it in GitHub Desktop.
This file contains 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
// Task function body | |
let continuePolling = true; | |
while (continuePolling) { | |
yield this.get('ajax').raw(url, headers).then(() => { | |
if (somethingBoring) { | |
return timeout(pollingInterval); | |
} else { | |
continuePolling = false; | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment