lib/docman/commands/ssh_target_checker.rb in docman-0.0.6 vs lib/docman/commands/ssh_target_checker.rb in docman-0.0.7

- old
+ new

@@ -8,18 +8,18 @@ def execute filename = File.join(self['file_path'], @context['docroot_name'] + @context['environment'], self['filename']) Net::SFTP.start(self['ssh_host'], self['ssh_user']) do |sftp| n = 0 begin + sleep 15 n+=1 log "Checking if files deployed, retry ##{n}, filename: #{filename}" sftp.stat!(filename) do |response| unless response.ok? sleep 15 end end data = YAML.load sftp.download!(filename) - sleep 30 end until data['random'] == self['version'] end true end