senecajs-labs / seneca-queue Goto Github PK
View Code? Open in Web Editor NEWA multi-transport job queue for Seneca
License: MIT License
A multi-transport job queue for Seneca
License: MIT License
In case of errors from the remote server the seneca instance die because of fatal$ being true in plugins for seneca 0.6, 0.7, 0.8.
Mocha is a missing dep when running the tests :)
i used your examples, only started 1 server, put the client in an interval loop.
kept getting errors for the server that wasn't up.
i see a blacklist in your code, but maybe it's not used for this purpose. if it is then it's failing.
after a minute or so my client crashes.
maybe the queue should kick clients out that error.
At the moment external queue implementation are discovered automatically by searching for registered actions with the appropriate "hook" pattern. Requests are then distributed among found implementations with a round robin algorithm.
I think this may cause two problems:
We may also want to create a seneca-queue-test package to check for queues conformity (along the lines of seneca-store-test and seneca-transport-test)
how to return error/success value callback from server??
I have return with certain parameters but it get undefined
Ex-
Client.js
var s = require('seneca')()
.client({ port: 8081, pin: 'cmd:enqueue-remote,queue:q1' })
.use('../', {
queues: ['q1', 'q2']
})
var res_cb=function(err,success){
console.log("Success",success);
}
s.act({ role: 'queue', cmd: 'enqueue', msg: { task: 'my task', param: 1 ,count:1}},res_cb);
Server1.js
var s = require('seneca')()
.use(require('../'))
.listen({ port: 8081 })
s.add({
task: 'my task'
}, function(args, cb) {
return cb(null, { b: 2 })
})
console.log('worked if you see OK two times')
s.act({ role: 'queue', cmd: 'start' })
Output of client.js
Success undefined
The returned value gets undefined. can you please suggest any way to achieive these.
Thanks,
Jayesh
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.