Tahi-project/iHat — pull request #26 by neo-tahi (2014-12-04 21:51:30+00:00)
Title: Refactor callbacks

References:
* https://www.pivotaltracker.com/story/show/83452714

Major changes:
* `Job` knows about its progress via state machine (instead of asking for sidekiq status)
* `Job` is no longer tied to a Sidekiq worker instance (no more `jid`)
* Response from `create`, `show`, or callback notification after document conversion is exactly the same (goes through `JobSerializer`)
* `Job` stores incoming metadata when created and returns it when it is serialized
* `ConversionWorker` no longer handles callbacks. They are handled as a result of a `Job`'s transition to `converted` through a `CallbackWorker`

API changes:
* root key `jobs` ---> `job`
* `status` ---> `state`
- values: `queued` ---> `pending`, `complete` ---> `converted`
* `url` is always included, is null when job is not `converted`
* adds `metadata`