Initial commit
This commit is contained in:
10
app/jobs/add_headshot_collection_uid_to_project_job.rb
Normal file
10
app/jobs/add_headshot_collection_uid_to_project_job.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class AddHeadshotCollectionUidToProjectJob < ApplicationJob
|
||||
queue_as :default
|
||||
|
||||
def perform(project)
|
||||
# TODO: move this into Project model?
|
||||
collection = HeadshotCollection.for_project(project)
|
||||
response = BrayniacAI::Collection.create!(collection)
|
||||
project.update_attribute(:headshot_collection_uid, response.collection_id)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user