Class: UREST::WaitProg
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- UREST::WaitProg
- Defined in:
- lib/urest.rb
Overview
}}}
Instance Method Summary collapse
-
#response ⇒ Object
{{{.
Instance Method Details
#response ⇒ Object
{{{
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/urest.rb', line 182 def response opts = @a[0] fname = File.join(opts['dir'],@r[-2]) if opts['progs'].include? fname + '.urp' if @h['CPEE_CALLBACK'] EM.defer do UREST::start_program(opts,fname) sleep 2 while UREST::robotprogram_running?(opts) sleep 0.25 end Typhoeus.put(@h['CPEE_CALLBACK']) end @headers << Riddl::Header.new("CPEE-CALLBACK", 'true') else UREST::start_program(opts,fname) end else @status = 403 end nil end |