Skip to content

Commit

Permalink
Merge pull request #4430 from fjordllc/chore/disconnect-all-user
Browse files Browse the repository at this point in the history
接続している全ユーザーを切断するrake taskを追加
  • Loading branch information
komagata authored Mar 17, 2022
2 parents 331e0b5 + 16d0b21 commit ddf06e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/tasks/bootcamp.rake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ namespace :bootcamp do
)
end

desc 'Disconnect all DB user.'
task disconnect_all_user: :environment do
ActiveRecord::Base.connection.execute "SELECT pid FROM pg_stat_activity WHERE datname = 'bootcamp_staging'"
end

namespace :oneshot do
desc 'Cloud Build Task'
task cloudbuild: :environment do
Expand Down

0 comments on commit ddf06e4

Please sign in to comment.