Skip to content

Commit

Permalink
index by id, using date or year as input
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jan 4, 2019
1 parent 8fba52b commit 54bf4b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/initializers/_version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Lupo
class Application
VERSION = "2.2.5"
VERSION = "2.2.6"
end
end
6 changes: 3 additions & 3 deletions lib/tasks/doi.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 54bf4b7

Please sign in to comment.