Class: Voodoo::AppEngine
- Inherits:
-
PeopleTools
- Object
- PeopleTools
- Voodoo::AppEngine
- Defined in:
- lib/voodoo/peopletools/appengine.rb
Instance Attribute Summary
Attributes inherited from PeopleTools
#command_line_options, #executable
Instance Method Summary collapse
- #call_executable ⇒ Object
-
#initialize ⇒ AppEngine
constructor
A new instance of AppEngine.
- #run(ae_name, target) ⇒ Object
Methods inherited from PeopleTools
Constructor Details
#initialize ⇒ AppEngine
Returns a new instance of AppEngine.
6 7 8 9 |
# File 'lib/voodoo/peopletools/appengine.rb', line 6 def initialize super @executable = File.join(@tools_bin, %w{psae.exe}) end |
Instance Method Details
#call_executable ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/voodoo/peopletools/appengine.rb', line 23 def call_executable LOG.debug("Executable is set to #{@executable}") LOG.debug("Command line options are set to #{@command_line_options.join(" ")}") #f = IO.popen(@executable + " " + @command_line_options.join(" ")) #f.readlines.each { |line| puts ("#{line.chomp}")} #f.close pid = spawn("start " + @executable + " " + @command_line_options.join(" ")) LOG.debug("Created background process #{pid} for #{@executable}") Process.detach(pid) @command_line_options.clear set_base_parameters end |
#run(ae_name, target) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/voodoo/peopletools/appengine.rb', line 11 def run(ae_name, target) append(:db_type => target.db_type) append(:env_name => target.name) append(:env_username => target.app_username) append(:env_password => target.app_password) append(:r => '1') append(:ae_name => ae_name) #puts "Running #{ae_name}..." LOG.info("Running #{ae_name}...") call_executable end |