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

Install master-specific modules. #1

Closed
mcollina opened this issue Feb 23, 2014 · 2 comments
Closed

Install master-specific modules. #1

mcollina opened this issue Feb 23, 2014 · 2 comments
Labels
stale This issue or pull request is old

Comments

@mcollina
Copy link
Member

I often use the level-ttl module, which I must attach only once in the 'master' process. What is the right approach? I think this use case is not handled at the moment.

I can't just add a 'promoted' event, as I need to intercept the creation of the new database. So, if it's ok for you I'll add a wrapMaster option with a function to install the master-only modules. So we can replace this line
https://github.com/substack/level-party/blob/master/index.js#L54
with:

proxy.swap(opts.wrapMaster && opts.wrapMaster(db) || db);

Shall I submit a PR?

@TehShrike
Copy link

I'm interested in a solution to this problem as well.

@vweevers
Copy link
Member

vweevers commented Dec 8, 2019

Is this still an issue, or can it be closed?

@vweevers vweevers added the stale This issue or pull request is old label Dec 8, 2019
@vweevers vweevers closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This issue or pull request is old
Projects
None yet
Development

No branches or pull requests

3 participants