Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change minor fixity report task #2573

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/tasks/fixity_check.rake
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ namespace :scholars_archive do
latest_file = ChecksumAuditLog.where("updated_at >= ?", start_time)
file_checked = latest_file.count
file_passed = latest_file.where("passed = true").count
file_failed = latest_file.where("passed = false").count

# QUERY #2: Get all the ids that failed via checking with fixity
failed_arr += latest_file.where("passed = false").map(&:file_set_id)

# DATA: Count the failed in the array instead of query
file_failed = failed_arr.count

# APPEND: Display an outro message saying Fixity is done checking
Rails.logger.info "\n[COMPLETE] All fixity checks complete!\n"

Expand Down