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

Check for unclosed lock in read-dbs #92

Merged
merged 8 commits into from
Jan 3, 2017
Merged

Check for unclosed lock in read-dbs #92

merged 8 commits into from
Jan 3, 2017

Conversation

martinheidegger
Copy link
Contributor

If the solution doesn't close the database a unclear error is printed. This PR adds the same error display that is used in other parts of the workshopper also when reading the database for a comparsion.

This PR fixes #42.

var dinosaurs = db.sublevel('dinosaurs')

;[robots, dinosaurs].map(function (lev, i) {
lev.put('slogan', 1 === i ? 'rawr' : 'beep boop');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

;

Copy link
Contributor Author

@martinheidegger martinheidegger Dec 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

; is required since the rest of the file has no ;'s 😄

}
var result = {}
var stream = db.readStream()
var error
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not declarations do on top of scope?

callback(error || err, result)
level(dir, { valueEncoding: valueEncoding }, function (err, db) {
if (err) {
if ( err.type === 'OpenError') {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting: extra space ( err.type

@martinheidegger
Copy link
Contributor Author

martinheidegger commented Dec 29, 2016

Waiting for #95 to be merged.

@martinheidegger martinheidegger merged commit 446446c into master Jan 3, 2017
@martinheidegger martinheidegger deleted the fix/42 branch January 3, 2017 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LOCK: The process cannot access the file because it is being used by another process
2 participants