Giter Club home page Giter Club logo

gate-executor's People

Contributors

adrieankhisbe avatar geek avatar jakepruitt avatar paolochiodi avatar rjrodger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gate-executor's Issues

EventEmitter memory leak detected seems to stem from seneca

    |
api_1             | [ Nodemon ][ Error ] Trace
api_1             |     at GateExecutor.addListener (events.js:252:17)
api_1             |     at GateExecutor.once (events.js:278:8)
api_1             |     at Seneca.api_ready [as ready] (/var/app/current/api/node_modules/seneca/seneca.js:923:30)
api_1             |     at meta.export (/var/app/current/api/node_modules/seneca-web/web.js:661:14)
api_1             |     at Layer.handle [as handle_request] (/var/app/current/api/node_modules/express/lib/router/layer.js:95:5)
api_1             |     at trim_prefix (/var/app/current/api/node_modules/express/lib/router/index.js:312:13)
api_1             |     at /var/app/current/api/node_modules/express/lib/router/index.js:280:7
api_1             |     at Function.process_params (/var/app/current/api/node_modules/express/lib/router/index.js:330:12)
api_1             |     at next (/var/app/current/api/node_modules/express/lib/router/index.js:271:10)
api_1             |     at SessionStrategy.strategy.pass (/var/app/current/api/node_modules/passport/lib/middleware/authenticate.js:325:9)
api_1             |     at SessionStrategy.authenticate (/var/app/current/api/node_modules/passport/lib/strategies/session.js:71:10)
api_1             |     at attempt (/var/app/current/api/node_modules/passport/lib/middleware/authenticate.js:348:16)
api_1             |     at authenticate (/var/app/current/api/node_modules/passport/lib/middleware/authenticate.js:349:7)
api_1             |     at Layer.handle [as handle_request] (/var/app/current/api/node_modules/express/lib/router/layer.js:95:5)
api_1             |     at trim_prefix (/var/app/current/api/node_modules/express/lib/router/index.js:312:13)
api_1             |     at /var/app/current/api/node_modules/express/lib/router/index.js:280:7
api_1             |

I believe this is GateExecutor adding listeners and not removing them

Consider using fastparallel instead of setImmediate?

I was doing some tracing of an application, and I noted that there was a non-trivial amounts of calls to setImmediate being made in a misbehaving seneca application. It might be a simple but practical micro-optimization.

Also i recall needing to use a setImmediate library to deal with some strange browser compatibility issue in the past, so this might be good for cross-platform support.

https://github.com/mcollina/fastparallel

timeout bug

When gate-executor switched from jobs-specific setTimeouts to a generic setInterval a new bug has been introduced.

When the queue is empty the setInterval is cleared, but when a new job is added to the queue it isn't restarted.
This means that jobs added after the first "clear" will never fire a timeout.

Here's a PR with a test that exposes the bug: #15

This is the cause of the error reported in:
senecajs/seneca-amqp-transport#48
senecajs/seneca#517

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.