Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (16 sloc) 0.568 kb
Que = require '../'
Que.connect ['gearman://']
require 'should'
describe 'Que', ->
describe 'Drivers', ->
describe 'Gearman', ->
it 'should process data', (done) ->
class EchoReverseWorker extends Que.Model
driver: 'gearman'
job: 'echoReverse'
process: (callback) ->
callback false, echo: @params.message.split('').reverse().join('')
EchoReverseWorker = Que.setup EchoReverseWorker
EchoReverseWorker.submit message: '2pac', (err, response) ->
response.echo.should.equal 'cap2'
do done
Jump to Line
Something went wrong with that request. Please try again.