Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommendation to separate jobs for different "envs" #141

Open
stripedpumpkin opened this issue Jan 18, 2023 · 0 comments
Open

Recommendation to separate jobs for different "envs" #141

stripedpumpkin opened this issue Jan 18, 2023 · 0 comments

Comments

@stripedpumpkin
Copy link

Hello. We have django app for which we have "django envs" which can be though of as Rails envs. This allows us to run the app locally against various databases (among other things). We would like to run dramatiq on at least two of these (local) envs, using a local redis instance as both broker and backend. We would like to avoid having these two envs colliding. One idea that came to mind was to do something like:

DRAMATIQ_BROKER = {
    "BROKER": "dramatiq.brokers.redis.RedisBroker",
    "OPTIONS": {
        "url": "redis://localhost:6379",
        'db': env.int('RQ_LOCAL_REDIS_DB_SLOT'),
    },

(we have a separate setting config file for each env, essentially mimicking what happens in Rails.)

and using a different redis db for each env, but we are using the various dbs for other apps (typically sidekiq) and this seems like a suboptimal solution.

Is there a natural (or at least recommended) way to isolate the jobs coming from separate envs (and maybe results as well) ?

Thanks for reading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant