Skip to content

Commit

Permalink
relay log
Browse files Browse the repository at this point in the history
  • Loading branch information
simon300000 committed Oct 6, 2020
1 parent e63ae5e commit dd2df70
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ module.exports = async ({ state, db }) => {

dd.on('url', url => console.log('job received', url))

dd.on('relay', (...msg) => {
const m = msg.join(' ')
console.log('relay', ...msg)
state.log = m
})

dd.on('done', (now, duration, url) => {
state.delay = Math.round(process.uptime() * 1000 / state.completeNumNow)
console.log(`job complete ${(duration / 1000).toFixed(2)}s`, state.delay)
Expand Down

0 comments on commit dd2df70

Please sign in to comment.