defunkt/resque — pull request #479 by bogdan (2011-12-16 10:04:09+00:00)
Title: Resque.enqueue: validate job earliers than running before_enqueue hooks

Some plugins interact with redis with their `before_enqueue` hooks.

Example from resque-lock

``` ruby
def before_enqueue_lock(*args)
Resque.redis.setnx(lock(*args), true)
end
```

If the job doesn't have queue specified - this may cause job to be lock forever until lock will be manually removed.

In order to fix that let's validate job before running `before_enqueue` hooks.