-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use Cardinal cluster for Maya jobs instead of Owens (#149)
Use Cardinal cluster for Maya jobs instead of Owens.
- Loading branch information
Showing
3 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ def cluster | |
end | ||
|
||
def available_versions | ||
['2020', '2022', '2023'] | ||
['2025'] | ||
end | ||
|
||
def job_name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |