capricorn 0.2.11 → 0.2.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/capricorn/apps/satellite.rb +6 -0
- data/lib/capricorn/server.rb +4 -0
- data/lib/capricorn/server/proxy.rb +1 -1
- data/lib/capricorn/system.rb +11 -0
- metadata +1 -1
@@ -31,6 +31,12 @@ module Capricorn
|
|
31
31
|
def uninstall(domain)
|
32
32
|
Capricorn.client(options[:token]).uninstall_satellite(domain)
|
33
33
|
end
|
34
|
+
|
35
|
+
desc 'relink DOMAIN', 'relink a satellite'
|
36
|
+
method_options :token => :optional
|
37
|
+
def relink(domain)
|
38
|
+
Capricorn.client(options[:token]).relink_satellite(domain)
|
39
|
+
end
|
34
40
|
end
|
35
41
|
|
36
42
|
end
|
data/lib/capricorn/server.rb
CHANGED
@@ -56,6 +56,10 @@ module Capricorn
|
|
56
56
|
Capricorn.system.install_satellite(domain)
|
57
57
|
end
|
58
58
|
|
59
|
+
def relink_satellite(domain)
|
60
|
+
Capricorn.system.relink_satellite(domain)
|
61
|
+
end
|
62
|
+
|
59
63
|
def uninstall_satellite(domain)
|
60
64
|
satellite = Capricorn.system.find_satellite(domain)
|
61
65
|
if satellite
|
@@ -14,7 +14,7 @@ module Capricorn
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
allow :stop_server, :restart_server, :reload_server, :server_version, :update_server, :install_satellite, :uninstall_satellite, :install_engine, :update_engine, :uninstall_engine, :satellites, :queued_jobs, :cancel_job, :immediate_job, :make_development_satellite, :update_gems
|
17
|
+
allow :stop_server, :restart_server, :reload_server, :server_version, :update_server, :install_satellite, :uninstall_satellite, :install_engine, :update_engine, :uninstall_engine, :satellites, :queued_jobs, :cancel_job, :immediate_job, :make_development_satellite, :update_gems, :relink_satellite
|
18
18
|
|
19
19
|
class << self
|
20
20
|
undef_method :allow
|
data/lib/capricorn/system.rb
CHANGED
@@ -77,6 +77,17 @@ module Capricorn
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
+
def relink_satellite(domain)
|
81
|
+
self.queue.enqueue("relink satellite #{domain}", :domain => domain) do |options|
|
82
|
+
satellite = Capricorn::Satellite.new(options[:domain])
|
83
|
+
|
84
|
+
if satellite
|
85
|
+
run_action_on :link_satellite, satellite
|
86
|
+
save_satellite! satellite
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
80
91
|
def uninstall_satellite(satellite)
|
81
92
|
if satellite
|
82
93
|
self.queue.enqueue("uninstall #{satellite.domain}", :satellite => satellite) do |options|
|