fent / clusterhub Goto Github PK
View Code? Open in Web Editor NEWSync data in your cluster applications.
License: MIT License
Sync data in your cluster applications.
License: MIT License
6.0.1
to 6.0.2
.This version is covered by your current version range and after updating it in your project the build failed.
mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
Two more regressions fixed:
mocha.opts
(@boneskull)--require
does not break on module names that look like certain node
flags (@boneskull)The new version differs by 6 commits.
00a895f
Release v6.0.2
1edce76
update CHANGELOG for v6.0.2 [ci skip]
347e9db
fix broken positional arguments in config; ensure positional args are unique; closes #3763
9e31e9d
fix handling of bareword args matching node flags; closes #3761
6535965
Update "karma-browserify" to eliminate Karma middleware warning (#3762)
37febb6
improve issue template. (#3411)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
For example:
hub.emit('event', msg).once('anotherEvent', function(anotherMsg) {
console.log(anotherMsg);
});
In order to simulate remote function call:
// worker
hub.emit('masterFunc', args, function() {
hub.on('masterFuncReturn', function(result) {
console.log(result);
});
});
// master
hub.on('masterFunc', function(args) {
hub.emit('masterFuncReturn', masterFunc(args));
});
At first I've hope that this module is still supported by you.
This error is thrown when clusterhub tried to call child.worker.send
and worker.send
in fork.js
and globals.js
and - of course - crash whole program.
You can try to reproduce this by killing and spawning cluster workers instances.
My resolution is add simple try / catch
for these lines, but probably you will find some better approach for this.
Hi,
I'd just like to confirm, HUB instances are made one per process in cluster as well as there is a separate database per process?
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
package.json
files, so that was left aloneIf you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didn’t already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Branch | Build failing 🚨 |
---|---|
Dependency | mocha |
Current Version | 3.5.3 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mocha is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.
I recommend you give this issue a high priority. I’m sure you can resolve this 💪
You might want to read this before filing a new bug! 😝
For more info, please read this article.
node
from exiting will do so when run in Mocha. Supply the --exit
flag to revert to pre-v4.0.0 behavior (@ScottFreeCode, @boneskull)stdout:
prefix from browser reporter logs (@skeggse)--forbid-pending
or --forbid-only
is specified (@ScottFreeCode)--compilers
command-line option is now soft-deprecated and will emit a warning on STDERR
. Read this for more info and workarounds (@ScottFreeCode, @boneskull)The new version differs by 48 commits.
d69bf14
Release v4.0.0
171b9f9
pfix "prepublishOnly" potential portability problem
60e39d9
Update link to wiki (GitHub at the leading --
)
804f9d5
Update link because GitHub ate the leading --
3326c23
update CHANGELOG for v4.0.0 [ci skip]
6dd9252
add link to wiki on --compilers deprecation
96318e1
Deprecate --compilers
92beda9
drop bower support
58a4c6a
remove unused .npmignore
7af6611
kill Date#toISOString shim
43501a2
reduce noise about slow tests; make a few tests faster, etc.
fa228e9
update --exit / --no-exit integration test for new default behavior
3fdd3ff
Switch default from forced exit to no-exit
c5d69e0
add integration tests for --exit/--no-exit
3a7f8dc
enhance runMochaJSON() helper by returning the subprocess instance
There are 48 commits in total.
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot 🌴
By some reasons http server throw error when I use clusterhub in application.
node -v / 10.0.3
TypeError: Cannot read property 'getsockname' of undefined
at net.js:1049:23
at Object.4:1 (cluster.js:586:5)
at handleResponse (cluster.js:170:41)
var cluster = require('cluster');
var numCPUs = require('os').cpus().length;
var hub = require('clusterhub');
if (cluster.isMaster) {
// Fork workers.
var cpuCount = require('os').cpus().length;
// Create a worker for each CPU
for (var i = 0; i < cpuCount; i += 1) {
cluster.fork();
}
} else {
hub.on('event', function(data) {
console.log(data);
});
// emit event to all workers
hub.emit('event', { foo: 'bar' });
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('okay');
}).listen(3000);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.