PeopleAdmin/resque-clues — pull request #10 by lwoodson (2014-08-30 17:33:29+00:00)
Title: Allow access to clues_metadata during jobs perform method

* Added Runtime mixin to provide access to jobs that need it
* Store clues_metadata in a threadlocal dupe
* Merge back data from dupe into original on perform_finish
or failed
* Updated readme with usage
* cleaned up some specs

Here is a manual verification of this at work. Define a dummy class like this that injects the clues metadata hash with an environment variable value.

![worker class](http://i.imgur.com/0QMsLJh.png)

Then start two workers with different MESSAGE env variables and make note of their pids.

```
MESSAGE="first worker" QUEUE="test" INTERVAL="0.1" bundle exec rake resque:work &
MESSAGE="second worker" QUEUE="test" INTERVAL="0.1" bundle exec rake resque:work &
```

Open a console and enqueue a few dummy jobs like this:

```ruby
20.times {Resque.enqueue NoOpWorker}
```

Grep the resque-clues logs for the two env var messages and verify they match the worker pids as expected.

Output for worker 1:

![worker one](http://i.imgur.com/xP3aMb7.png)

Output for worker 2:

![worker two](http://i.imgur.com/FkMItoS.png)