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
{{{
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/urest.rb', line 187 def response opts = @a[0] fname = File.join(opts['dir'],@r[1..-2].join('/')) if opts['progs'].include? fname 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 |