Class: Pantry::Chef::SyncCookbooks

Inherits:
Pantry::Command
  • Object
show all
Defined in:
lib/pantry/chef/sync_cookbooks.rb

Overview

Client syncs up it’s local list of Chef Cookbooks with what the Server says the Client should have.

Defined Under Namespace

Classes: FileAndReceiverInfo

Instance Method Summary collapse

Instance Method Details

#perform(message) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/pantry/chef/sync_cookbooks.rb', line 8

def perform(message)
  cookbooks_to_download = ask_server_for_cookbook_list
  Pantry.logger.debug("[#{client.identity}] Downloading cookbooks #{cookbooks_to_download}")

  recievers = build_cookbook_receivers(cookbooks_to_download)
  send_receiver_information_to_server(recievers)
  wait_for_receivers_to_finish(recievers)
  true
end