Add transaction step to persist metadata to local database
!44 (merged) introduced an initial database schema and configuration so that we can persist records to a local postgresql database for handling tasks such as a k8s CronJob
to delete/suppress items from Kaltura once their license has expired #56 (closed)
Probably will want to use some combination of:
- https://sequel.jeremyevans.net/rdoc/classes/Sequel/Model/ClassMethods.html#method-i-find_or_create for find/create a Model/record instance
- https://sequel.jeremyevans.net/rdoc/classes/Sequel/Model/InstanceMethods.html#method-i-save for saving
-
https://sequel.jeremyevans.net/rdoc/files/doc/object_model_rdoc.html#label-Sequel-3A-3AModel (wrap the dataset/table with ORM functionality specified
☝ )
Acceptance Criteria:
-
Add a persist
transaction step that runs after thetransform
step successfully completes -
Consider moving https://gitlab.com/ucsdlibrary/development/library-media-integrations/blob/trunk/app/transaction.rb#L59-59 back into the transform step since it could then be used in the following persist and publish steps. -
Add unit tests to ensure metadata gets written as expected coming from the transform
step
Edited by Matt Critchlow