Skip to content

Commit

Permalink
don't override default import method. #288
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 9, 2019
1 parent ead1144 commit 0d60347
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def self.query_aggregations
{}
end

def self.import(options={})
def self.import_by_ids(options={})
from_id = (options[:from_id] || 1).to_i
until_id = (options[:until_id] || Activity.maximum(:id)).to_i

Expand Down
2 changes: 1 addition & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def self.find_by_id(ids, options={})
})
end

def self.import(options={})
def self.import_by_ids(options={})
from_id = (options[:from_id] || 1).to_i
until_id = (options[:until_id] || Doi.maximum(:id)).to_i

Expand Down
2 changes: 1 addition & 1 deletion app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def self.find_by_id(ids, options={})
})
end

def self.import(options={})
def self.import_by_ids(options={})
from_id = (options[:from_id] || 1).to_i
until_id = (options[:until_id] || Event.maximum(:id)).to_i

Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/activity.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ namespace :activity do
from_id = (ENV['FROM_ID'] || 1).to_i
until_id = (ENV['UNTIL_ID'] || Activity.maximum(:id)).to_i

Activity.import(from_id: from_id, until_id: until_id)
Activity.import_by_ids(from_id: from_id, until_id: until_id)
end
end
2 changes: 1 addition & 1 deletion lib/tasks/doi.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace :doi do
from_id = (ENV['FROM_ID'] || 1).to_i
until_id = (ENV['UNTIL_ID'] || Doi.maximum(:id)).to_i

Doi.import(from_id: from_id, until_id: until_id)
Doi.import_by_ids(from_id: from_id, until_id: until_id)
end

desc 'Import one DOI'
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/event.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ namespace :event do
from_id = (ENV['FROM_ID'] || 1).to_i
until_id = (ENV['UNTIL_ID'] || Event.maximum(:id)).to_i

Event.import(from_id: from_id, until_id: until_id)
Event.import_by_ids(from_id: from_id, until_id: until_id)
end
end

0 comments on commit 0d60347

Please sign in to comment.