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

level-jobs in cluster ? #24

Open
BoussonNicolas opened this issue Jan 22, 2018 · 1 comment
Open

level-jobs in cluster ? #24

BoussonNicolas opened this issue Jan 22, 2018 · 1 comment

Comments

@BoussonNicolas
Copy link

BoussonNicolas commented Jan 22, 2018

Hello,
I would like to make a cluster of my node.js process that uses a level-jobs queue, but at the second process sent, I am getting this error, which I think means that the 2nd queue attempted to be setup is blocked:

events.js:160 throw er; // Unhandled 'error' event ^ OpenError: IO error: lock ./db/LOCK: Resource temporarily unavailable

Is it possible to use this package in such a case please, so that several node js processes would use a single common queue, instead of attempting to create several ones ? Any help would be very appreciated :)

@maxlath
Copy link
Contributor

maxlath commented Apr 7, 2018

that's typically what level-party addresses:

const level = require('level-party')
const db = level('./db')
const Jobs = require('level-jobs')
const queue = Jobs(db, worker, options)

should work in cluster mode

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

2 participants