Skip to content

Commit

Permalink
Merge pull request rubyforgood#6067 from MclPio/main
Browse files Browse the repository at this point in the history
Modify store_deploy_time.rake
  • Loading branch information
FireLemons authored Oct 16, 2024
2 parents 4f68eb6 + 85280b1 commit 55ca1c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/tasks/deployment/20211023145114_store_deploy_time.rake

This file was deleted.

14 changes: 14 additions & 0 deletions lib/tasks/deployment/99991023145114_store_deploy_time.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace :after_party do
desc "Deployment task: stores_the_time_of_the_latest_deploy_as_a_file"
task store_deploy_time: :environment do
puts "Running deploy task 'store_deploy_time'" unless Rails.env.test?
pending_files = AfterParty::TaskRecorder.pending_files

down_tasks = pending_files.reject { |item| item.task_name == "store_deploy_time" }
if down_tasks.empty?
Health.instance.update_attribute(:latest_deploy_time, Time.now)
else
puts("failed tasks found, latest_deploy_time will not be updated!")
end
end
end

0 comments on commit 55ca1c4

Please sign in to comment.