Created
July 25, 2018 00:30
-
-
Save cjus/e17b27aabf4bd9ecca42d75f16fc9638 to your computer and use it in GitHub Desktop.
Message processing snipit
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
async checkForTasks(callback) { | |
let message; | |
try { | |
message = await this.hydra.getQueuedMessage(this.serviceName); | |
} catch (e) { | |
this.logger('fatal', e); | |
return; | |
} | |
// message processing code lines deleted here... | |
setTimeout(async () => { | |
await this.checkForTasks(callback); | |
}, this.messageCheckDelay); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment