-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
7 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,4 +1,3 @@ | |||
|
|||
0.0.1 / 2010-01-03 | 0.0.1 / 2010-01-03 | ||
================== | ================== | ||
|
|
||
|
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,4 +1,3 @@ | |||
|
|||
test: | test: | ||
@echo "populate me" | @echo "populate me" | ||
|
|
||
|
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1 @@ | |||
|
|||
module.exports = require('./lib/cluster.exception'); | module.exports = require('./lib/cluster.exception'); |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,12 +1,68 @@ | |||
|
|||
/*! | /*! | ||
* cluster.exception | * cluster.exception | ||
* Copyright(c) 2011 Arnout Kazemier <info@3rd-Eden.com> | * Copyright(c) 2011 Arnout Kazemier <info@3rd-Eden.com> | ||
* MIT Licensed | * MIT Licensed | ||
*/ | */ | ||
|
|
||
exports = module.exports = function(options){ | |||
options = options || {}; | |||
|
|||
function exception(error, cluster){ | |||
var details = { | |||
environment: { | |||
root: process.cwd() | |||
, arguments: process.argv | |||
, env: process.env | |||
, gid: process.getgid() | |||
, uid: process.getuid() | |||
, pid: process.pid | |||
, versions: { | |||
node: process.versions.node | |||
, v8: process.versions.v8 | |||
, ares: process.versions.ares | |||
, libev: process.versions.ev | |||
} | |||
} | |||
, os: { | |||
platform: process.platform | |||
, type: os.type() | |||
, release: os.release() | |||
, hostname: os.hostname() | |||
} | |||
, stats: { | |||
loadaverage: os.loadavg() | |||
, cpus: os.cpus() | |||
, freemem: os.freemem() | |||
, totalmem: os.totalmem() | |||
, memory: process.memoryUsage() | |||
} | |||
, error: { | |||
message: error.message | |||
, stack: error.stack | |||
} | |||
, cluster: { | |||
|
|||
} | |||
}; | |||
} | |||
|
|||
/** | |||
* | |||
* @param {Cluster} cluster A worker or client instance | |||
*/ | |||
function plugin(cluster){ | |||
// Add a listener to the process | |||
process.on("uncaughtException", function(){ | |||
|
|||
}); | |||
}; | |||
|
|||
// Make sure that we also have it called | |||
plugin.enableInWorker = true; | |||
return plugin; | |||
}; | |||
|
|||
/** | /** | ||
* Library version. | * Library version. | ||
*/ | */ | ||
|
exports.version = "0.0.0"; | ||
exports.version = '0.0.1'; |