[ARVADOS] updated: 1.3.0-603-ga73766902
Git user
git at public.curoverse.com
Wed Mar 27 17:51:15 UTC 2019
Summary of changes:
services/api/app/models/container.rb | 8 ++++----
.../db/migrate/20190322174136_add_file_info_to_collection.rb | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
via a737669021ac34683deecda8130e21b243e14174 (commit)
from 696ee0e5e854347aeb37bdabe3ae3d7712403d06 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit a737669021ac34683deecda8130e21b243e14174
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date: Wed Mar 27 13:50:26 2019 -0400
14484: Makes quotation marks consistent
Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
diff --git a/services/api/app/models/container.rb b/services/api/app/models/container.rb
index 0e6a01c63..694aa5a0d 100644
--- a/services/api/app/models/container.rb
+++ b/services/api/app/models/container.rb
@@ -418,15 +418,15 @@ class Container < ArvadosModel
any = true
total = ActiveRecord::Base.connection.exec_query(
- 'SELECT DISTINCT portable_data_hash FROM collections'
+ "SELECT DISTINCT portable_data_hash FROM collections"
).rows.count
while any
any = false
pdhs_res = ActiveRecord::Base.connection.exec_query(
- 'SELECT DISTINCT portable_data_hash FROM collections '\
+ "SELECT DISTINCT portable_data_hash FROM collections "\
"WHERE portable_data_hash > '#{last_pdh}' "\
- 'GROUP BY portable_data_hash LIMIT 1000'
+ "GROUP BY portable_data_hash LIMIT 1000"
)
break if pdhs_res.rows.count.zero?
@@ -439,7 +439,7 @@ class Container < ArvadosModel
Rails.logger.info(log_prefix + ": #{done}/#{total}")
end
end
- Rails.logger.info(log_prefix + ': finished')
+ Rails.logger.info(log_prefix + ": finished")
end
# NOTE: Migration 20190322174136_add_file_info_to_collection.rb relies on this function.
diff --git a/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb b/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
index a1a436ce5..c1c336247 100755
--- a/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
+++ b/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
@@ -8,21 +8,21 @@ class AddFileInfoToCollection < ActiveRecord::Migration
def do_batch(pdhs)
pdhs_str = ''
pdhs.each do |pdh|
- pdhs_str << "'" << pdh << "'" << ','
+ pdhs_str << "'" << pdh << "'" << ","
end
collections = ActiveRecord::Base.connection.exec_query(
- 'SELECT DISTINCT portable_data_hash, manifest_text FROM collections '\
+ "SELECT DISTINCT portable_data_hash, manifest_text FROM collections "\
"WHERE portable_data_hash IN (#{pdhs_str[0..-2]}) "
)
collections.rows.each do |row|
manifest = Keep::Manifest.new(row[1])
- ActiveRecord::Base.connection.exec_query('BEGIN')
+ ActiveRecord::Base.connection.exec_query("BEGIN")
ActiveRecord::Base.connection.exec_query("UPDATE collections SET file_count=#{manifest.files_count}, "\
"file_size_total=#{manifest.files_size} "\
"WHERE portable_data_hash='#{row[0]}'")
- ActiveRecord::Base.connection.exec_query('COMMIT')
+ ActiveRecord::Base.connection.exec_query("COMMIT")
end
end
@@ -30,7 +30,7 @@ class AddFileInfoToCollection < ActiveRecord::Migration
add_column :collections, :file_count, :integer, default: 0, null: false
add_column :collections, :file_size_total, :integer, default: 0, null: false
- Container.group_pdhs_for_multiple_transactions('AddFileInfoToCollection') do |pdhs|
+ Container.group_pdhs_for_multiple_transactions("AddFileInfoToCollection") do |pdhs|
do_batch(pdhs)
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list