Skip to content

Commit

Permalink
Change all references of directory to 'launchers'
Browse files Browse the repository at this point in the history
  • Loading branch information
euler-room committed Oct 31, 2024
1 parent 7b9d297 commit 19cdcf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/app/models/launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ClusterNotFound < StandardError; end

class << self
def launchers_dir(project_dir)
Pathname.new("#{project_dir}/.ondemand/scripts")
Pathname.new("#{project_dir}/.ondemand/launchers")
end

def find(id, project_dir)
Expand Down
12 changes: 6 additions & 6 deletions apps/dashboard/app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ def sync_template
# This creates them _and_ serializes them to yml in the new directory.
def save_new_scripts
dir = Launcher.launchers_dir(template)
Dir.glob("#{dir}/*/form.yml").map do |script_yml|
Launcher.from_yaml(script_yml, project_dataroot)
end.map do |script|
saved_successfully = script.save
errors.add(:save, script.errors.full_messages) unless saved_successfully
Dir.glob("#{dir}/*/form.yml").map do |launcher_yml|
Launcher.from_yaml(launcher_yml, project_dataroot)
end.map do |launcher|
saved_successfully = launcher.save
errors.add(:save, launcher.errors.full_messages) unless saved_successfully

saved_successfully
end.all? do |saved_successfully|
Expand All @@ -279,7 +279,7 @@ def save_new_scripts
def rsync_args
[
'rsync', '-rltp',
'--exclude', 'scripts/*',
'--exclude', 'launchers/*',
'--exclude', '.ondemand/job_log.yml',
"#{template}/", project_dataroot.to_s
]
Expand Down

0 comments on commit 19cdcf2

Please sign in to comment.