Skip to content

Instantly share code, notes, and snippets.

@jherdman
Last active June 2, 2016 20:35
Show Gist options
  • Save jherdman/4090d7f71eacd4fba22726fa77359e72 to your computer and use it in GitHub Desktop.
Save jherdman/4090d7f71eacd4fba22726fa77359e72 to your computer and use it in GitHub Desktop.
// 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