RetrieveManagedTaskResult (open)
Waits until a managed task is finished, returns its result. Throws if the task has failed.
Syntax
LOADLIB "mod::system/lib/tasks.whlib";
RECORD FUNCTION RetrieveManagedTaskResult(INTEGER taskid, DATETIME maxwait, RECORD options)
Parameters
INTEGER taskid
Id of the task
DATETIME maxwait
Wait until this time
RECORD options
Options
BOOLEAN acceptcancel
Don't throw if the task is cancelled
BOOLEAN accepttempfailure
Don't throw if the task is temporarily failed but will still retry
BOOLEAN accepttimeout
In case of timeout, just return a default record
Return value
RECORD
Task result