Skip to content

Commit

Permalink
Rescue Object in run:remote also LM/BH
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Apr 30, 2009
1 parent f344d15 commit e8439e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 27 deletions.
35 changes: 16 additions & 19 deletions lib/testjour/commands/run_remote.rb
Expand Up @@ -13,31 +13,28 @@ module Commands
class RunRemote < RunSlave

def execute
Signal.list.each do |name, code|
next if name == "VTALRM"

Signal.trap(code) do
Testjour.logger.info "Received signal: #{code}"
end
end

configuration.parse!
configuration.parse_uri!

# raise configuration.rsync_uri.inspect

Dir.chdir(configuration.in) do
Testjour.setup_logger(configuration.in)
Testjour.logger.info "Starting run:slave"
Testjour.logger.info "Starting run:remote"

rsync
Testjour.logger.info "Setup"
configuration.setup
configuration.setup_mysql
Testjour.logger.info "Requiring"
require_files
Testjour.logger.info "Working"
work

begin
Testjour.logger.info "Setup"
configuration.setup
configuration.setup_mysql
Testjour.logger.info "Requiring"
require_files
Testjour.logger.info "Working"

work
rescue Object => ex
Testjour.logger.error "run:remote error: #{ex.message}"
Testjour.logger.error ex.backtrace.join("\n")
end
end
end

Expand Down
8 changes: 0 additions & 8 deletions lib/testjour/commands/run_slave.rb
Expand Up @@ -12,14 +12,6 @@ module Commands
class RunSlave < Command

def execute
Signal.list.each do |name, code|
next if name == "VTALRM"

Signal.trap(code) do
Testjour.logger.info "Received signal: #{code}"
end
end

configuration.parse!
configuration.parse_uri!

Expand Down

0 comments on commit e8439e0

Please sign in to comment.