5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-25 23:06:22 +00:00
panel/db/migrate/20230421182627_change_full_rsync_destination.rb
f 79398d0448
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fixup! fix: cambiar las direcciones de sincronización a rsyncd
2023-04-21 15:44:22 -03:00

22 lines
532 B
Ruby

# frozen_string_literal: true
# Envía los cambios a través de rsyncd
class ChangeFullRsyncDestination < ActiveRecord::Migration[6.1]
def up
DeployFullRsync.find_each do |deploy|
Rails.application.nodes.each do |node|
deploy.destination = "rsync://rsyncd.#{node}/deploys/"
deploy.save
end
end
end
def down
DeployFullRsync.find_each do |deploy|
Rails.application.nodes.each do |node|
deploy.destination = "sutty@#{node}:"
deploy.save
end
end
end
end