Class: Zold::Routines::Reconnect
- Inherits:
-
Object
- Object
- Zold::Routines::Reconnect
- Defined in:
- lib/zold/commands/routines/reconnect.rb
Overview
Reconnect to the network
Instance Method Summary collapse
- #exec(_ = 0) ⇒ Object
-
#initialize(opts, remotes, log: Log::Quiet.new) ⇒ Reconnect
constructor
A new instance of Reconnect.
Constructor Details
Instance Method Details
#exec(_ = 0) ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/zold/commands/routines/reconnect.rb', line 38 def exec(_ = 0) sleep(60) unless @opts['routine-immediately'] unless @opts['routine-immediately'] Remote.new(remotes: @remotes, log: @log).run(%w[remote add b1.zold.io 80 --force]) end Remote.new(remotes: @remotes, log: @log).run(%w[remote trim]) Remote.new(remotes: @remotes, log: @log).run( %w[remote update] + (@opts['never-reboot'] ? [] : ['--reboot']) ) end |