Skip to content

Commit

Permalink
bundle exec rubocop -a
Browse files Browse the repository at this point in the history
  • Loading branch information
christinach committed Dec 24, 2024
1 parent 4bcb056 commit 9c19d83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
end

every :hour, roles: [:cron_production] do
rake "index_timestamp:check"
rake 'index_timestamp:check'
end
6 changes: 4 additions & 2 deletions lib/tasks/index_timestamp.rake
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace :index_timestamp do
desc "Check the timestamp for the last index update and raise an error if it has not updated today"
desc 'Check the timestamp for the last index update and raise an error if it has not updated today'
task check: :environment do
active_manager = IndexManager.all.select { |index_manager| index_manager.solr_collection.match(/catalog-alma-production$/) }
Honeybadger.notify("The index has not been updated in more than 24 hours. Please check if the incremental updates are running.") if (Time.zone.now - active_manager.updated_at).to_i > 86_400
if (Time.zone.now - active_manager.updated_at).to_i > 86_400
Honeybadger.notify('The index has not been updated in more than 24 hours. Please check if the incremental updates are running.')
end
end
end

0 comments on commit 9c19d83

Please sign in to comment.