Skip to content

Commit

Permalink
Allow logger to be set via an accessor. Add a sleep in upload to redu…
Browse files Browse the repository at this point in the history
…ce CPU impact.

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@7180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jamis committed Jul 11, 2007
1 parent b53072e commit 5c370ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG
@@ -1,5 +1,9 @@
*SVN*

* Add a millisecond sleep in upload to reduce CPU impact [Jamis Buck]

* Allow the logger to be set via Configuration#logger= [Jamis Buck]

* Allow $CAPISTRANO:HOST$ to be used in filenames to the put command [Jamis Buck]

* Allow execute_on_servers to be called without a current task again [Jamis Buck]
Expand Down
2 changes: 1 addition & 1 deletion lib/capistrano/configuration.rb
Expand Up @@ -19,7 +19,7 @@ module Capistrano
# define roles, and set configuration variables.
class Configuration
# The logger instance defined for this configuration.
attr_reader :logger
attr_accessor :logger

def initialize #:nodoc:
@logger = Logger.new
Expand Down
1 change: 1 addition & 0 deletions lib/capistrano/upload.rb
Expand Up @@ -70,6 +70,7 @@ def process!
failed!(sftp)
end
end
sleep 0.01 # a brief respite, to keep the CPU from going crazy
end
logger.trace "upload finished" if logger

Expand Down

0 comments on commit 5c370ba

Please sign in to comment.