From f5375cdd4a9273252cbf52382259f00d52e5eb88 Mon Sep 17 00:00:00 2001 From: Hector Correa Date: Thu, 25 Jul 2024 13:48:19 -0400 Subject: [PATCH] Re-added rake task to save to a file the aterm script to create a project (#860) --- lib/tasks/projects.rake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/tasks/projects.rake b/lib/tasks/projects.rake index 4bf2649c..7ce0e984 100644 --- a/lib/tasks/projects.rake +++ b/lib/tasks/projects.rake @@ -81,6 +81,16 @@ namespace :projects do puts service.aterm_script end + desc "Outputs to a file the Aterm script to create a project in Mediaflux" + task :create_script_file, [:project_id] => [:environment] do |_, args| + project_id = args[:project_id] + project = Project.find(project_id) + service = MediafluxScriptFactory.new(project: project) + file_name = "project_create_#{project.id}.txt" + puts "Saving script to #{file_name}" + File.write(file_name, service.aterm_script) + end + task :download_file_list, [:netid, :project_id] => [:environment] do |_, args| netid = args[:netid] user = User.where(uid: netid).first