Git Product home page Git Product logo

Comments (4)

jrallison avatar jrallison commented on August 31, 2024

Ah, yep. Supporting a namespace would be great.

There are only three redis keys per queue that go-workers touches:

  1. the queue list, key name generated here:
    fmt.Sprint("queue:", queue),
  2. retry sorted set, which is currently a constant:
    RETRY_KEY = "goretry"
  3. inprogress list used with brpoplpush:
    return fmt.Sprint(f.manager.queue, ":", Config.processId, ":inprogress")

I could see a config option which allows a namespace to be defined, and then some mechanism which applies the namespace to the keys above.

If you want to give it a... go, then it'd be much appreciated! If not, I can take a crack at it a bit later.

Thanks!

from go-workers.

jonnii avatar jonnii commented on August 31, 2024

All the arguments need to be namespaced too, an alternative might be to wrap the conn and expose a strongly typed API which knows how to apply a namespace... we could just expose the functions we need.

from go-workers.

jrallison avatar jrallison commented on August 31, 2024

Humm, which arguments other than the keys would you need to namespace? I believe it's just the keys (which is all redis-namespace does for the operations you listed).

There's room for a more general redis namespacing library in the golang ecosystem, but in this case, with how stable the sidekiq api is, I doubt this library would benefit from that extra complexity. I could be wrong...

from go-workers.

jonnii avatar jonnii commented on August 31, 2024

zrangebyscore requires all arguments except the last one to be namespaced. I agree that extra complexity isn't needed.

from go-workers.

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.