class

PlaceOS::Driver::Task

Inherits Reference < Object

Constants

DEFAULT_BACKTR = [] of String
DEFAULT_RESULT = "null"

Constructors

new(queue : PlaceOS::Driver::Queue, callback : Proc(Task, Nil), priority : Int32, timeout : Time::Span, retries : Int32, wait : Bool, name : String | Nil, delay : Time::Span | Nil, clear_queue : Bool = false)
Source

Instance methods

abort(reason = nil, code : Int32 | Nil = 500, warn : Bool = true)

call when the task has failed and we don't want to retry

Source
apparent_priority
Source
apparent_priority=(apparent_priority : Int32)
Source
backtrace
Source
clear_queue
Source
clear_queue=(clear_queue : Bool)
Source
code

the response code that the browser will receive when executing via HTTP

Source
code=(code : Int32 | Nil)

the response code that the browser will receive when executing via HTTP

Source
delay
Source
error_class
Source
last_executed
Source
name
Source
payload
Source
priority
Source
priority=(priority : Int32)
Source
processing
Source
processing=(processing : Nil | Slice(UInt8), PlaceOS::Driver::Task -> _)
Source
reset_timers

a partial response was received and we don't want the timeout to trigger a retry

Source
retries
Source
retries=(retries : Int32)
Source
retry(reason = nil)

call when possible temporary failure or device busy

Source
state
Source
success(result = nil, code : Int32 | Nil = 200)

call when result is a success.

The result should support conversion to JSON otherwise the remote will only receive nil

Source
wait
Source

Nested types