GithubHelp home page GithubHelp logo

Comments (5)

cayuu avatar cayuu commented on May 14, 2024

We ended up having to roll our own to enable something like this, for a variety of use-cases where this was the right trade off. It was also handy being able to share DB connection pool context for certain types of jobs.

from bree.

shadowgate15 avatar shadowgate15 commented on May 14, 2024

In order for it to offload it would probably make since for bree to create a dedicated worker that could then accept a message containing the path to the job and run the job. This way the main thread does not get stuck and therefore no longer processing other scheduled jobs that should be run on a separate event loop.

It probably makes sense to address #45, before trying to do this. If #45 was addressed it might resolve this issue without a specified "offload" option, since the overhead wouldn't be a problem any more.

from bree.

naz avatar naz commented on May 14, 2024

Hey @niftylettuce, @titanism, and @shadowgate15 is inlining jobs still something you'd be happy to have as a part of the package?

One of the usecases for such jobs is being able to have all the environment setup as the parent process has already but use same messaging, scheduling, etc. as the rest of jobs in bree. The implementation I'm thinking of is similar to one Ghost has taken through fastq - I'd aim to mostly port the functionality from Ghost's job manager into bree.

Or do you think non-worker-thread work is not something that belongs to bree?

from bree.

titanism avatar titanism commented on May 14, 2024

New features and PR's always welcome. We don't use inline jobs because if one crashes then all crash on same process, which is why we did this with worker threads.

from bree.

naz avatar naz commented on May 14, 2024

Awesome, thanks @titanism. Yes, you are spot on with the downside of inline jobs. It's a trade-off a developer would need to decide on when choosing a way to run their jobs 👍

from bree.

Related Issues (20)

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.