diff --git a/config/initializers/_version.rb b/config/initializers/_version.rb index 4836da4c5..178e3cb93 100644 --- a/config/initializers/_version.rb +++ b/config/initializers/_version.rb @@ -1,5 +1,5 @@ module Lupo class Application - VERSION = "2.2.5" + VERSION = "2.2.6" end end \ No newline at end of file diff --git a/lib/tasks/doi.rake b/lib/tasks/doi.rake index b9c9e6f9d..d605a2e04 100644 --- a/lib/tasks/doi.rake +++ b/lib/tasks/doi.rake @@ -60,10 +60,10 @@ namespace :doi do until_date = ENV['UNTIL_DATE'] || Date.current.strftime("%F") end - index_time = ENV['INDEX_TIME'] || Time.zone.now.utc.iso8601 - client_id = ENV['CLIENT_ID'] + from_id = Doi.where(created: from_date).first + until_id = Doi.where(created: until_date).last - Doi.index(from_date: from_date, until_date: until_date, index_time: index_time, client_id: client_id) + Doi.index_by_ids(from_id: from_id, until_id: until_id) end desc 'Index DOIs per day'