Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added documentation and fixed small issues.
- Loading branch information
Joachim Kainz
committed
Sep 26, 2011
1 parent
d519882
commit 77f52a4
Showing
4 changed files
with
104 additions
and
52 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
var util = require("util"); | ||
console.log('Started the worker'); | ||
|
||
process.on('message', function(message) { | ||
console.log('Worker received: %s', util.inspect(message, false, 100)); | ||
console.log('Worker received a message from the master and is sending it back: ', message); | ||
process.send({ | ||
"received": message | ||
"client received": message | ||
}); | ||
}); | ||
}); | ||
process.on('config', function(config) { | ||
console.log('Worker received the following configuration from the master: ', config); | ||
}); | ||
process.on('terminate', function() { | ||
console.log('Worker received a request to termine from the master'); | ||
}); | ||
// | ||
// Let the users know that we are started. Logs are forwarded to the parent process and printed there. | ||
// | ||
console.log('Started the worker'); |
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
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