Tasks
Tasks
addResult()
Adds a task result to the application
Arguments
Name | Type | Required | Default | Options | Description |
taskID | string | No | | | |
jobType | string | No | | | |
jobID | string | No | | | |
ownedBy | string | No | | | |
result | struct | Yes | | | |
addTask()
Adds a task to the processing queue.
Arguments
Name | Type | Required | Default | Options | Description |
taskID | string | No | #application.fapi.getUUID()# | | |
jobType | string | No | | | |
jobID | string | No | | | |
action | string | Yes | | | |
details | any | Yes | | | |
ownedBy | string | No | | | |
stacktrace | array | No | #arraynew(1)# | | |
claimTask()
Removes the first task in the queue and returns it
Arguments
Name | Type | Required | Default | Options | Description |
threadID | string | Yes | | | |
clearProcessingThreads()
Terminates threads that haven't done work in a while
Arguments
Name | Type | Required | Default | Options | Description |
None |
clearTaskResults()
Removes results that are too old from the queue
Arguments
Name | Type | Required | Default | Options | Description |
jobID | uuid | No | | | |
before | numeric | No | #getTickCount() - application.config.taskqueue.resultTimeout * 60000# | | |
endJob()
Remotes all tasks and results for a job, and stops any thread running one of it's tasks
Arguments
Name | Type | Required | Default | Options | Description |
jobID | uuid | Yes | | | |
getJobs()
Returns all jobs that have results logged
Arguments
Name | Type | Required | Default | Options | Description |
None |
getResults()
Removes and returns matching results
Arguments
Name | Type | Required | Default | Options | Description |
taskID | string | No | | | |
jobID | string | No | | | |
ownedBy | string | No | | | |
previousTick | numeric | No | | | |
clearResults | boolean | No | true | | |
getTaskCount()
Returns the number of tasks remaining for the given criteria
Arguments
Name | Type | Required | Default | Options | Description |
taskID | string | No | | | |
jobID | string | No | | | |
ownedBy | string | No | | | |
getThreadCount()
Returns number of threads
Arguments
Name | Type | Required | Default | Options | Description |
None |
init()
Arguments
Name | Type | Required | Default | Options | Description |
None |
killThread()
Terminates a specified thread
Arguments
Name | Type | Required | Default | Options | Description |
threadID | string | Yes | | | |
requeueTask | boolean | No | true | | |
processTask()
Actually process the task
Arguments
Name | Type | Required | Default | Options | Description |
stTask | struct | Yes | | | |
removeTask()
Removes a task from the processing queue, and returns it's details
Arguments
Name | Type | Required | Default | Options | Description |
taskID | string | Yes | | | |
requeueTask()
Requeues a task
Arguments
Name | Type | Required | Default | Options | Description |
taskID | string | Yes | | | |
resetTasks()
Remotes all tasks and results for a job, and stops any thread running one of it's tasks
Arguments
Name | Type | Required | Default | Options | Description |
jobID | uuid | Yes | | | |
startProcessingThread()
If the thread limit hasn't been reached, this starts a new one
Arguments
Name | Type | Required | Default | Options | Description |
None |