Giter Site home page Giter Site logo

ActiveJob interface about toiler HOT 2 OPEN

mercadolibre avatar mercadolibre commented on May 25, 2024
ActiveJob interface

from toiler.

Comments (2)

sschepens avatar sschepens commented on May 25, 2024

Toiler's working great for us in production now by the way, much better than Shoryuken was, lower memory and faster processing!

Glad to hear that!

I investigated how ActiveJob works and it's kind of tricky, right now Toiler assumes a queue is bound to only one Worker or Job. ActiveJob supports dispatching multiple jobs to a single queue and it sends in the payload the actual class of the job that created the message to instantiate it and call process on it.

Maybe we could implement a separate Module for ActiveJob, something like including Toiler::Job and have a different logic there that's specific for ActiveJob.

Anyways, this requires a few changes, toiler should serialize jobs to the queue in a specific way to support ActiveJob.

I don't have much time lately, @bglusman if you guys could tackle this it would be great!

from toiler.

bglusman avatar bglusman commented on May 25, 2024

That could work.. I also think it's OK if, for instance, all toiler active job classes require you to use the queue_as option and it's an error to not call that from a class (or to have two classes with the same queue?), but the Toiler::Job thing sounds promising. It does seem like active job vaguely assumes there jobs are enqueued from rails which is not the case for many people using SQS but shoryuken had an active job adapter and I imagine we can borrow or adapt a lot of their logic. Thanks, will let you know, this is probably lead important to us than the other ticket Abe's now of s nice to have/maybe we can give something back to help toiler adoption/community, so we'll probably timebox and see how it goes.

from toiler.

Related Issues (5)

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.