Class: BlackStack::MyBotProcess

Inherits:
MyRemoteProcess
  • Object
show all
Defined in:
lib/browserfactory.rb

Overview

clase de base para todos los bots ejecuten acciones con una cuenta de LinkedIn, Facebook, Twitter, etc.

Instance Method Summary collapse

Instance Method Details

#runObject


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/browserfactory.rb', line 50

def run()
  begin
    super
  rescue Interrupt => e
    self.logger.reset
    self.logger.log 'Interrupt signal on MyBotProcess!'
    
    self.logger.logs 'Close all browsers... '
    begin
      BlackStack::BrowserFactory.destroy
      self.logger.done
    rescue => e
      self.logger.logf("error:#{e.to_s}")
    end
    
    # raise the exception
    raise e
  end # begin ... rescue
end