Class: CPEE::ModelManagement::AbandonUrl

Inherits:
Riddl::Implementation
  • Object
show all
Defined in:
lib/cpee-model-management/implementation.rb

Overview

}}}

Instance Method Summary collapse

Instance Method Details

#responseObject

{{{



533
534
535
536
537
538
539
540
541
542
# File 'lib/cpee-model-management/implementation.rb', line 533

def response
  aba = @p.first.value
  res1 = Typhoeus.get(File.join(aba,'properties','state','/'))
  if res1.success?
    if res1.response_body == 'ready' || res1.response_body == 'stopped'
      Typhoeus.put(File.join(aba,'properties','state','/'), headers: {'Content-Type' => 'application/x-www-form-urlencoded'}, body: "value=abandoned")
    end
  end
  nil
end