mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 10:51:42 +00:00
crear un rsync por cada sitio existente
This commit is contained in:
parent
a0134cc052
commit
aa0c359554
1 changed files with 16 additions and 0 deletions
16
db/migrate/20220406211042_add_deploy_rsync_to_sites.rb
Normal file
16
db/migrate/20220406211042_add_deploy_rsync_to_sites.rb
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Agrega un DeployRsync hacia los servidores alternativos para cada
|
||||||
|
# sitio
|
||||||
|
class AddDeployRsyncToSites < ActiveRecord::Migration[6.1]
|
||||||
|
def up
|
||||||
|
Site.find_each do |site|
|
||||||
|
SiteService.new(site: site).send :sync_nodes
|
||||||
|
site.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
DeployRsync.destroy_all
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue