examples/worker.js
function reverse (data, callback) {
  if (Math.random() > 0.9) {
    callback('oh noes!')
  } else {
    callback(null, data.split('').reverse().join(''))
  }
}
function reverse (data, callback) {
  if (Math.random() > 0.9) {
    callback('oh noes!')
  } else {
    callback(null, data.split('').reverse().join(''))
  }
}
function reverse ( data , callback ) { if ( Math . random ( ) > 0.9 ) { callback ( 'oh noes!' ) } else { callback ( null , data . split ( '' ) . reverse ( ) . join ( '' ) ) } }
This task reverses the given string, failing randomly.
This task reverses the given string failing randomly .