SyncoSourceSyncoScriptScope

class ScriptScope

Definitions

def run_servers(group)

This function runs the method for each directory and server combination specified.

Implementation

def run_servers(group)
	target_servers do |server|
		sync_scope = TargetScope.new(self, server)
		
		Console.info(self, "Running script...", master: @master_server, target: server)
		
		server.try(sync_scope) do
			@script.directories.each do |directory|
				directory_scope = DirectoryScope.new(sync_scope, directory)
				
				Console.info(self, "Processing directory...", directory: directory)
				
				directory.try(directory_scope) do
					method.call(directory_scope)
				end
			end
		end
	end
end