Created
September 17, 2021 13:26
-
-
Save rvigneshw/c7c101de94fdcdcd4dc8b4ad4825ae74 to your computer and use it in GitHub Desktop.
Child process code template
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
process.on('message', (payload) => { | |
try { | |
//Some time taking stuff | |
const processedData = processData(payload); | |
process.send(processedData); | |
} catch (error) { | |
process.send(error); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment