Skip to content

Commit

Permalink
Fix error logger
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Nov 28, 2023
1 parent 5e032c5 commit 4470d2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function create (options) {
var currentUnixSeconds = Math.round(Date.now() / 1000)

function logError(err, result) {
if (err) console.error("@@@", err)
if (err) console.error(err)
}

lazyStream(tableDb.createKeyStream({}), logError)
Expand All @@ -156,7 +156,7 @@ function create (options) {
getIndexDb: getIndexDb,
}
var itemDb = getItemDb(table.TableName)
var kvStream = lazyStream(itemDb.createReadStream({}), logError())
var kvStream = lazyStream(itemDb.createReadStream({}), logError)
kvStream = kvStream.filter(function (item) {
var ttl = item.value[table.TimeToLiveDescription.AttributeName]
return ttl && typeof ttl.N === 'string' && currentUnixSeconds > Number(ttl.N)
Expand Down

0 comments on commit 4470d2c

Please sign in to comment.