Skip to content

Commit

Permalink
use Cardinal cluster for Maya jobs instead of Owens (#149)
Browse files Browse the repository at this point in the history
Use Cardinal cluster for Maya jobs instead of Owens.
  • Loading branch information
johrstrom authored Jan 8, 2025
1 parent c91172f commit 7706ca5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/maya_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def cluster
end

def available_versions
['2020', '2022', '2023']
['2025']
end

def job_name
Expand Down
4 changes: 2 additions & 2 deletions config/configuration_singleton.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ def sftp_host
end

def submit_cluster
ENV['OOD_FRAME_RENDERER_CLUSTER'] || "owens"
ENV['OOD_FRAME_RENDERER_CLUSTER'] || 'cardinal'
end

def cores
(ENV['OOD_FRAME_RENDERER_CORES'] || 28).to_i
(ENV['OOD_FRAME_RENDERER_CORES'] || 48).to_i
end

def maya_script_template
Expand Down
17 changes: 17 additions & 0 deletions config/initializers/cardinal_update.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

# When we migrated from Owens to Cardinal, the only version on
# Cardinal is 2025, so update all the records for the user
# as whatever version they have in the DB won't work.
Rails.application.config.after_initialize do
begin
Script.all.each do |script|
if script.is_a?(MayaScript)
script.version = '2025' if script.version.to_s < '2025'
script.save
end
end
rescue
# nothing to do, no database table exists.
end
end

0 comments on commit 7706ca5

Please sign in to comment.