Skip to content

Commit

Permalink
chore(cu): omit noisy/superfluous logs
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed Jun 5, 2024
1 parent e21b563 commit b7d3d7c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion servers/cu/src/domain/client/ao-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export function loadBlocksMetaWith ({ fetch, GRAPHQL_URL, pageSize, logger }) {
*/
timestamp: block.timestamp * 1000
})))
.then(logger.tap('Loaded blocks meta after height %s up to timestamp %s', min, maxTimestamp))
// .then(logger.tap('Loaded blocks meta after height %s up to timestamp %s', min, maxTimestamp))
))
.toPromise()
}
2 changes: 1 addition & 1 deletion servers/cu/src/domain/lib/loadMessageMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ export function loadMessageMetaWith (env) {
messageTxId: ctx.messageTxId
}))
.map(ctxSchema.parse)
.map(logger.tap('Loaded message process and timestamp and appended to ctx %j'))
// .map(logger.tap('Loaded message process and timestamp and appended to ctx %j'))
}
}
6 changes: 1 addition & 5 deletions servers/cu/src/domain/lib/loadMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ function loadCronMessagesWith ({ loadTimestamp, findBlocks, loadBlocksMeta, save
*/
rightMostTimestamp: ctx.to || currentBlock.timestamp
}))
.map(logger.tap('reconciling blocks meta for scheduled messages in range of %o'))
// .map(logger.tap('reconciling blocks meta for scheduled messages in range of %o'))
.chain(({ leftMost, rightMostTimestamp }) =>
reconcileBlocks({ min: leftMost.block.height, maxTimestamp: rightMostTimestamp })
.map(blocksMeta => {
Expand Down Expand Up @@ -483,10 +483,6 @@ function loadCronMessagesWith ({ loadTimestamp, findBlocks, loadBlocksMeta, save
}
})
)
.map(ctx => {
logger('Merging Streams of Scheduled and Cron Messages...')
return ctx
})
.map(({ leftMost, rightMostTimestamp, $scheduled, genCronMessages }) => {
return composeStreams(
$scheduled,
Expand Down
15 changes: 8 additions & 7 deletions servers/cu/src/domain/lib/loadProcess.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Rejected, Resolved, fromPromise, of } from 'hyper-async'
import { always, identity, isNotNil, mergeRight, omit, pick } from 'ramda'
import { always, identity, isNotNil, mergeRight, pick } from 'ramda'
import { z } from 'zod'

import { findEvaluationSchema, findLatestProcessMemorySchema, findProcessSchema, isProcessOwnerSupportedSchema, loadProcessSchema, locateProcessSchema, saveLatestProcessMemorySchema, saveProcessSchema } from '../dal.js'
Expand Down Expand Up @@ -113,7 +113,8 @@ function getProcessMetaWith ({ loadProcess, locateProcess, findProcess, saveProc
*/
.bimap(
logger.tap('Could not find process in db. Loading from chain...'),
logger.tap('found process in db %j')
identity
// logger.tap('found process in db %j')
)
/**
* Locate the scheduler for the process and attach to context
Expand Down Expand Up @@ -224,7 +225,7 @@ function loadLatestEvaluationWith ({ findEvaluation, findLatestProcessMemory, sa
}

function maybeCachedMemory (ctx) {
logger('Checking cache for existing memory to start evaluation "%s"...', ctx.id)
// logger('Checking cache for existing memory to start evaluation "%s"...', ctx.id)

return findLatestProcessMemory({
processId: ctx.id,
Expand Down Expand Up @@ -262,10 +263,10 @@ function loadLatestEvaluationWith ({ findEvaluation, findLatestProcessMemory, sa
if (['cold_start'].includes(found.src)) return Resolved(found)
if (['memory'].includes(found.src) && !found.fromFile) return Resolved(found)

logger(
'Seeding cache with latest checkpoint found with parameters "%j"',
omit(['Memory'], found)
)
// logger(
// 'Seeding cache with latest checkpoint found with parameters "%j"',
// omit(['Memory'], found)
// )
/**
* Immediatley attempt to save the memory loaded from a checkpoint
* into the LRU In-memory cache, which will cut
Expand Down

0 comments on commit b7d3d7c

Please sign in to comment.