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)
SourceInstance methods
abort(reason = nil, code : Int32 | Nil = 500, warn : Bool = true)
call when the task has failed and we don't want to retry
apparent_priority
Sourceapparent_priority=(apparent_priority : Int32)
Sourcebacktrace
Sourceclear_queue
Sourceclear_queue=(clear_queue : Bool)
Sourcecode=(code : Int32 | Nil)
the response code that the browser will receive when executing via HTTP
delay
Sourceerror_class
Sourcelast_executed
Sourcename
Sourcepayload
Sourcepriority
Sourcepriority=(priority : Int32)
Sourceprocessing
Sourceretries
Sourceretries=(retries : Int32)
Sourcestate
Sourcesuccess(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
wait
Source