samvera-labs / active_encode

Declare encode job classes that can be run by a variety of encoding services
Other
6 stars 8 forks source link

Persistence Mixin #13

Closed cjcolvar closed 6 years ago

cjcolvar commented 6 years ago

Write a module that will persist the ActiveEncode::Base object to a database (with polymorphism support?) whenever it's state is known and changed (e.g. #create, #find, #cancel, or #reload is called). This can be done overriding the Core methods, calling super, then persisting and returning the output. Or as a callback for those that provide a callback.

This database provides a more persistent history of encoding jobs given that external services may force expiration of old jobs. If this is to be used instead of requesting from the external service a caching strategy will need to be implemented to manage when to update from the external service and when not to.

A major benefit of having this mixin included in an ActiveEncode::Base subclass would be the ability to power a dashboard similar to resque-web or Sidekiq::Web.

Tasks

child of https://github.com/samvera-labs/avalon-bundle/issues/176