Cancel One Request (LCC.assist.cancel)
Declaration
ok, err, task = LCC.assist.cancel(id, timeout?)
Parameters
- id
String. Assist request ID. - timeout
Number, optional. Cancel request timeout in seconds. Defaults to10.
Return Values
- ok
Boolean.truewhen cancellation succeeds; otherwisefalse. - err
String ornil. Failure reason. - task
Table ornil. The cancelled task object.
Notes
Cancels one unfinished assist request.
After a cancellation returns a failure,LCC.assist.cancel_all()will not retry that task. Keep its ID; if cancellation must be retried, callLCC.assist.cancel(id)explicitly and checkokanderr.
Example
local ok, err, task = LCC.assist.cancel(taskId)
if not ok then
nLog("failed to cancel assist request", err)
end