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

Improve logging and handling messages with missing timestamp #2

Merged
merged 2 commits into from
Aug 9, 2016

Conversation

clehner
Copy link
Contributor

@clehner clehner commented Aug 5, 2016

This prevents the following error:

Error: could not find matching timestamp for index:{"sync":true}
    at /home/cel/src/streamview-links/index.js:163:31
    at /home/cel/src/ssb-query/index.js:68:26
  Error: missing timestamp:undefined
    at /home/cel/src/ssb-query/index.js:68:29
    at /home/cel/src/scuttlebot/node_modules/secure-scuttlebutt/node_modules/level-sublevel/shell.js:101:15
  NotFoundError: Key not found in database
    at /home/cel/src/scuttlebot/node_modules/secure-scuttlebutt/node_modules/level-sublevel/shell.js:101:18
    at /home/cel/src/scuttlebot/node_modules/secure-scuttlebutt/node_modules/level-sublevel/nut.js:120:19

I also removed the query logging which produces a lot of console output

@dominictarr
Copy link
Contributor

ah, thanks. I think sync: false is right,
but if(ts) return cb(null, {}) is wrong.
you shouldn't need that line because
https://github.com/dominictarr/streamview-links/blob/master/index.js#L162
will bypass the lookup (and just let the {sync: true} value pass).

@clehner
Copy link
Contributor Author

clehner commented Aug 8, 2016

I see. I didn't have up-to-date streamview-links. After updating and removing that line, everything works. I'm not sure if sync: false is necessary now in createLogStream (e7e3830), but it shouldn't hurt. Rebasing now.

@dominictarr
Copy link
Contributor

thanks, merged into 0.1.1 also now at
ssb://%/2+0YnI/0zOISVRyNie8nMuyO7yRWSYh1moXo/kVg00=.sha256

@clehner clehner deleted the fixes branch August 9, 2016 17:49
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

Successfully merging this pull request may close these issues.

None yet

2 participants