Skip to content

Commit

Permalink
cleanup and fixes to worker
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Sep 17, 2024
1 parent 722f2c9 commit ba0a112
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 103 deletions.
9 changes: 5 additions & 4 deletions apps/nocapd/src/classes/Worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,11 @@ export class NWWorker {
cacheMessage += `online & expired: ${this.cache_counts.onlineExpired} - `
cacheMessage += `expired: ${this.cache_counts.expired} - `
cacheMessage += `unchecked: ${this.cache_counts.unchecked} - `
cacheMessage += `total: ${this.cache_counts.allRelays} `
cacheMessage += `| ignored: ${this.cache_counts.ignoredRelays} - `
cacheMessage += `with parents: ${this.cache_counts.relaysWithParents} - `
cacheMessage += `parents: ${this.cache_counts.relaysAreParents} ===`
cacheMessage += `total: ${this.cache_counts.allRelays} | `
cacheMessage += `ignored: ${this.cache_counts.ignoredRelays} - `
cacheMessage += `parents: ${this.cache_counts.relaysAreParents} - `
cacheMessage += `children: ${this.cache_counts.relaysWithParents} ===`


this.log.info(chalk.blue.bold(cacheMessage));
})
Expand Down
6 changes: 3 additions & 3 deletions apps/nocapd/src/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const populateJobQueue = async () => {
const activeJobs = (await $q.checker.getActiveJobs()).map( j => j.id )
if(activeJobs.length > 0)
log.warn(`active jobs: ${activeJobs}`)
await $q.checker.populator()
await $q.checker.resetProgressCounts()
await $q.checker.populator().catch(log.error)
await $q.checker.resetProgressCounts().catch(log.error)
}

const maybePopulateJobs = async (queue) => {
Expand Down Expand Up @@ -184,7 +184,7 @@ const scheduleRelayPopulator = () =>{

const job = async () => {
log.debug(`Scheduled: populateRelays()`)
await populateRelays()
await populateRelays().catch(log.error)
}
return scheduleSeconds(name, seconds, job)
}
Expand Down
96 changes: 0 additions & 96 deletions internal/kinds/30111/README.md

This file was deleted.

0 comments on commit ba0a112

Please sign in to comment.