Skip to content

Commit

Permalink
allow other extensions except web files for data output
Browse files Browse the repository at this point in the history
  • Loading branch information
rdulepet committed Jun 2, 2010
1 parent 9fb9020 commit 78a575e
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions job.rb
Expand Up @@ -202,14 +202,7 @@ def store_results_and_logs
# .html,.htm,.css,.png,.pdf,.jpg
# iterate through directory and store files one at a time in S3
upload_files = Dir[File.join("#{Global.results_dir}/#{@curr_uuid}", "*")].select{|file| File.ftype(file) == "file" &&
(File.extname(file) == '.jpg' ||
File.extname(file) == '.png' ||
File.extname(file) == '.gif' ||
File.extname(file) == '.html' ||
File.extname(file) == '.htm' ||
File.extname(file) == '.js' ||
File.extname(file) == '.css' ||
File.extname(file) == '.pdf')}.each{|name|
/\.(jpg|png|gif|html|htm|js|css|pdf)$/.match(file)}.each{|name|
name = name.split("/").last
puts "RESULTS_FILE = #{Global.results_dir}/#{@curr_uuid}/#{name}"
upload_results_to_s3(@server_node,
Expand All @@ -226,16 +219,10 @@ def store_data
# upload only web content files for results
# .html,.htm,.css,.png,.pdf,.jpg
# iterate through directory and store files one at a time in S3
upload_files = Dir[File.join("#{Global.results_dir}/#{@curr_uuid}", "*")].select{|file| File.ftype(file) == "file" &&
(File.extname(file) != '.jpg' &&
File.extname(file) != '.png' &&
File.extname(file) != '.gif' &&
File.extname(file) != '.html' &&
File.extname(file) != '.htm' &&
File.extname(file) != '.js' &&
File.extname(file) != '.css' &&
File.extname(file) != '.pdf' &&
File.extname(file) != '.log')}.each{|name|
upload_files = Dir[File.join("#{Global.results_dir}/#{@curr_uuid}", "*")].select{|file|
puts "file in dir=#{file}"
File.ftype(file) == "file" &&
!/\.(jpg|png|gif|html|htm|js|css|pdf|log|r|rb|java|php|py|pyc|jar|gz|tar|zip|class|exe|so|o)$/.match(file)}.each{|name|
name = name.split("/").last
if ! @in_data_files.has_key?(name)
puts "DATA_OUTPUT_FILE = #{Global.results_dir}/#{@curr_uuid}/#{name}"
Expand Down

0 comments on commit 78a575e

Please sign in to comment.