loopj/node-sidekiq — pull request #2 by nicholasrq (2014-02-04 14:31:47+00:00)
Title: Dequeue support

Sometimes it's useful to have ability to cancel some jobs.

Now node-sidekiq supports it by `dequeue(payload)` method. For example

```javascript
var some_store = {},
sidekiq = new Sidekiq(cli);

sidekiq.enqueue("MyJobClass", [1,2,3], {queue: 'critical'}, function(payload){
some_store[user_session + ':some_action'] = payload;
});
```
and the cancel it using old payload:
```javascript
(function(user_session, action){
payload = some_store[user_session + ':' + action]
sidekiq.dequeue(payload) // will remove the job
/*
also avaliable aliases for debounce:
sidekiq.cancel
sidekiq.unsubscribe
*/
})() // some callback

Also i've set the default namespace to `sidekiq` as a default namespace in sidekiq config.