Skip to content

Commit

Permalink
fix(runtime): remove reconnection of mongo stream since bug in it
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Aug 19, 2023
1 parent ed6061d commit f6d8aed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
15 changes: 7 additions & 8 deletions runtimes/nodejs/src/support/db-change-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ export class DatabaseChangeStream {
this.updateEnvironments()
})

stream.on('close', () => {
logger.info('Conf collection change stream closed.')
setTimeout(() => {
logger.info('Reconnecting conf collection change stream...')
this.watchConf()
}, 3000)
})

// stream.on('close', () => {
// logger.info('Conf collection change stream closed.')
// setTimeout(() => {
// logger.info('Reconnecting conf collection change stream...')
// DatabaseChangeStream.watchConf()
// }, 3000)
// })
}

private static async updateEnvironments() {
Expand Down
14 changes: 7 additions & 7 deletions runtimes/nodejs/src/support/function-engine/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ export class FunctionCache {
}
})

stream.on('close', () => {
logger.error('Cloud function change stream closed')
setTimeout(() => {
logger.info('Reconnecting cloud function change stream...')
this.streamChange()
}, 3000)
})
// stream.on('close', () => {
// logger.error('Cloud function change stream closed')
// setTimeout(() => {
// logger.info('Reconnecting cloud function change stream...')
// FunctionCache.streamChange()
// }, 3000)
// })
}

/**
Expand Down

0 comments on commit f6d8aed

Please sign in to comment.