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

Scoped singleton archive #51

Open
chumager opened this issue Feb 28, 2019 · 6 comments
Open

Scoped singleton archive #51

chumager opened this issue Feb 28, 2019 · 6 comments

Comments

@chumager
Copy link

Hi, thanks for the module, I've an issue regarding to differents DB with the same sequence.

Reading your code I could check your archive lib is defined at the beginning of your code, instead of do it in the getInstance method so if you have two DB with the same sequence it return error.

Can you fix it please? It's just move the definition fron the top to inside the getInstance method.

Thanks in advance

@chumager
Copy link
Author

Sorry, my linter does not check on modules, it's a little more...

@ramiel
Copy link
Owner

ramiel commented Mar 9, 2019

I'm not sure I get it. Tell me if you still have any problem and I'll try to help you.

@chumager
Copy link
Author

Hi, I'd to fork your module... if you use a singleton to avoid sequence names repetition then you can't use the same sequence in 2 different DB... and I use your module in 2 cloned DB, to avoid problems with de DBs I used a Map yo define the scope.

I've never made a pull request, if You want I can see how and send you my modifications.

Best regards.

@Rfrixy
Copy link

Rfrixy commented Nov 18, 2019

I'm having the same issue, I'm returning multiple connections to the same database and each one of them try to register counters and crash. Require a scoped sequence_archive to fix this issue!

@chumager
Copy link
Author

I already fixed it with a map with the connection as the key, tell me if you need it

Regards

@ramiel
Copy link
Owner

ramiel commented Nov 21, 2019

Please, feel free to send a PR

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

3 participants