New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pluribus

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pluribus - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

lib/pluribus.js

@@ -1,2 +0,2 @@

/*jslint es5: true, browser: false, node: true, maxlen: 120 */
/*jslint browser: false, node: true, maxlen: 128 */

@@ -3,0 +3,0 @@ "use strict";

{
"name": "pluribus",
"version": "0.0.6",
"version": "0.0.7",
"author": {

@@ -9,2 +9,6 @@ "name": "twistdigital",

"main": "lib/pluribus.js",
"files": ["lib"],
"bugs": "https://github.com/twistdigital/pluribus/issues",
"homepage": "https://github.com/twistdigital/pluribus",
"dependencies": {},
"description": "Cluster manager",

@@ -36,27 +40,5 @@ "contributors": [

"license": "MIT",
"engine": {
"engines": {
"node": ">=0.6.12"
},
"_id": "pluribus@0.0.6",
"dependencies": {},
"devDependencies": {},
"optionalDependencies": {},
"engines": {
"node": "*"
},
"_engineSupported": true,
"_npmVersion": "1.1.16",
"_nodeVersion": "v0.6.15",
"_defaultsLoaded": true,
"dist": {
"shasum": "5d1149dba22fa7491977e8f56d4b626fffe99f33"
},
"_from": "https://github.com/twistdigital/pluribus/archive/v0.0.6.tar.gz",
"readme": "Pluribus\n========\n\nNode.JS cluster manager. Allows you to run multiple workers, handles reviving dead workers, graceful restart and shutdown of workers. Can run workers as different user/group to the master. Number of workers defaults to number of CPUs but is configurable.\n\nInstallation\n============\n\n<pre>$ npm install pluribus</pre>\n\nSimple example\n==============\n\n```javascript\nvar pluribus = require('pluribus');\n\nfunction worker() {\n console.log(\"I'm a worker\");\n}\n\nfunction master() {\n console.log(\"I'm the master\");\n}\n\npluribus.execute(\"Example\", {\"master\":master, \"worker\":worker});\n```\n\nThis example in use:\n\n<pre>$ node example.js\n2013-04-22T15:04:38.283Z 20586 Pluribus Master Forking new Example worker\n2013-04-22T15:04:38.294Z 20586 Pluribus Master Forking new Example worker\n2013-04-22T15:04:38.297Z 20586 Pluribus Master Running Example master method\nI'm the master\n2013-04-22T15:04:38.404Z 20588 Pluribus Worker Running Example worker method\nI'm a worker\n2013-04-22T15:04:38.416Z 20587 Pluribus Worker Running Example worker method\nI'm a worker</pre>\n\nKilling and Restarting\n======================\n\nPluribus automatically spawns replacements for dead workers.\n\nPluribus can also gracefully restart workers ('graceful' is defined in the [cluster docs](http://nodejs.org/api/cluster.html#cluster_worker_disconnect)).\n\n<pre># When a worker dies or is killed another will be spawned in its place\n$ kill 20588\n2013-04-22T15:04:55.162Z 20586 Pluribus Master Received exit event for Example worker 20588\n2013-04-22T15:04:55.163Z 20586 Pluribus Master Forking new Example worker\n2013-04-22T15:04:55.268Z 20589 Pluribus Worker Running Example worker method\nI'm a worker\n\n# Sending a SIGHUP to the master causes all workers to be gracefully restarted, eg to reload config\n$ kill -SIGHUP 20586\n2013-04-22T15:05:38.989Z 20586 Pluribus Master Received SIGHUP\n2013-04-22T15:05:38.989Z 20586 Pluribus Master Gracefully killing workers (cluster disconnect)\n2013-04-22T15:05:38.997Z 20586 Pluribus Master Received exit for Example worker 20589\n2013-04-22T15:05:38.997Z 20586 Pluribus Master Forking new Example worker\n2013-04-22T15:05:39.001Z 20586 Pluribus Master Received exit for Example worker 20587\n2013-04-22T15:05:39.001Z 20586 Pluribus Master Forking new Example worker\n2013-04-22T15:05:39.111Z 20591 Pluribus Worker Running Example worker method\nI'm a worker\n2013-04-22T15:05:39.122Z 20592 Pluribus Worker Running Example worker method\nI'm a worker\n\n# Sending a SIGINT to the master causes all workers to gracefully die, followed by the master\n$ kill -SIGINT 20586\n2013-04-22T15:06:13.467Z 20586 Pluribus Master Received SIGINT\n2013-04-22T15:06:13.468Z 20586 Pluribus Master Removing listeners for exit\n2013-04-22T15:06:13.468Z 20586 Pluribus Master Gracefully killing workers (cluster disconnect)\n2013-04-22T15:06:13.469Z 20586 Pluribus Master Exiting\n\n# Sending a SIGTERM to the master forces all workers to exit immediately, followed by the master\n$ kill -SIGTERM 20586\n2013-04-22T15:06:46.652Z 20586 Pluribus Master Received SIGTERM\n2013-04-22T15:06:46.652Z 20586 Pluribus Master Killing worker 20595\n2013-04-22T15:06:46.653Z 20586 Pluribus Master Killing worker 20596\n2013-04-22T15:06:46.653Z 20586 Pluribus Master Exiting</pre>\n\nAPI Documentation\n=================\n\nPluribus exports one method, called execute.\n\nThe execute method takes two arguments.\n\nFirst is a string used for logging. Can be anything. We suggest the name of your app.\n\nSecond is a config object with the following format and defaults:\n\n```javascript\nvar config = {};\nconfig.master = function() {}; // A function to execute as the master.\n // Optional. Default: none defined\n\nconfig.worker = function() {}; // A function to execute as the workers.\n // Optional-but-kinda-the-whole-point. Default: none defined\n\nconfig.silent = false; // If true pluribus will log nothing.\n // Optional. Default: false\n\nconfig.numWorkers = 2; // If set will attempt to spawn this number of workers.\n // Optional. Default: however many cpus there are\n\nconfig.privs = {}; // Affects the privileges of workers.\n // (eg if your master runs as root/via sudo but you don't want \n // your workers to)\n // When setting this option, master must be able to set uid and gid\n // otherwise an error will occur.\n // Optional. Default: workers run with same user and group as master\n\nconfig.privs.user = \"userName\"; // The username to run workers as.\n // Optional. Default - same as master\nconfig.privs.group = \"groupName\"; // The group to run workers as.\n // Optional. Default - same as master\n```",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/twistdigital/pluribus/issues"
},
"homepage": "https://github.com/twistdigital/pluribus",
"_resolved": "https://github.com/twistdigital/pluribus/archive/v0.0.6.tar.gz"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc