Skip to content

Instantly share code, notes, and snippets.

@thesurlydev
Created September 2, 2010 17:10
Show Gist options
  • Save thesurlydev/562569 to your computer and use it in GitHub Desktop.
Save thesurlydev/562569 to your computer and use it in GitHub Desktop.
public void run() throws Exception {
setUp();
while (run) {
try {
if (continueWithProcess()) {
if (!existingRequestsCleaned) {
cleanUpExistingRequests();
}
prepare();
poll();
} else {
doRest();
}
}
catch (Exception e) {
handleException(e);
}
Thread.sleep(sleepInSec * 1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment