tomykaira/clockwork — pull request #115 by DWvanGeest (2014-08-15 14:44:28+00:00)
Title: Feature/custom event options

Hi,

This PR adds the ability for the clockwork user to add custom options to their jobs. The specific use case I'm coding for is that our jobs use a queueing system (AMQP) which allows for a message timeout, and I want to be able to specify that TTL when declaring the job in `clock.rb`. But, I could also see this being more generally useful if you want to pass any kind of option to your job, without resorting to a job-specific handler (which can be quite un-DRY).

Tests pass and I've tested it out manually. I did not do anything to make this work with DB-backed events, since it wasn't immediately clear how a user should be specifying DB-backed options anyway (a string of JSON? another table with `key` and `value` columns?).

Suggestions for improvement welcome.