getTask

Parameters:

  • Id - id of the task to get

Returns:

  • TaskInfo - a structure of information about the task

    • Id - id for the task, can be used in further requests

    • Pid - Process ID of the task, may be -1 if task hasn't started

    • Profile - Profile for the task, or !SYSTEM for system-wide tasks

    • Action - the task's main action, defines its behavior (dispatch, updateindex, etc)

    • Status - the task's current status, possible values are:

      • queued - task is waiting to be run by the task monitor

      • starting - task has been launched and is starting up

      • running - task is running

      • finished - task completed successfully, see Detail may contain more information about its exit

      • incomplete - task exited before completing everything it could, Detail explains the reason for early exit (user canceling a walk, etc)

      • died - task ended abruptly and did not unregister itself, or the process was killed by another program.

    • Db - notes which of the internal databases the task is operating on for the profile. May be !NONE for system wide tasks, or !UNKNOWN if the task is still starting and hasn't set a database yet.

    • DbRole - currently unused

    • ParentType - defines the type of parent recorded for launching this task. See ParentData below for values and their meaning.

    • ParentData - Additional information about the process that launched this task, its content depends on the ParentType:

      • If ParentType=task, then ParentData contains the id of the task that launched this task.

      • If ParentType=web, then ParentData contains the name of the Webinator function that was invoked through the web to launch this task.

      • If ParentType=cli, then ParentData contains the name of the Webinator function that was invoked through the command line to launch this task.

      • If ParentType=unknown, then ParentData is the process id that launched this task.

    • Args - The arguments that were used to launched this task, can occur multiple times for multiple arguments.

    • Started - The dateTime this task was started. It will not be present for tasks that are queued or are still starting.

    • Updated - The dateTime this task last updated its information. Most tasks should update regularly, although may go long periods of time without updating during long operations.

    • NextRun - currently unused

    • Schedule - currently unused

    • Description (optional) - Additional information on what the task was launched to do. Some actions don't need a description (like updateindex), but others can provide additional information (walk lists its Base URL, etc).

    • Detail - For running tasks, Detail may contain additional information about what the task is currently doing (building indexes, etc).

      For finished tasks, Detail may contain additional information about the reason the task exited.

      ProgressInfo - Some tasks provide additional progress information, such as walks or replication senders.

      • Attempted - the number of items attempted (pages attempted to be fetched, items sent for replication, etc).

      • Saved - the number of successful items

      • Errors - the number of items that encountered an error

      • Bytes - the number of bytes transferred or processed

      • TodoCurrent - the number of items to do at the current depth

      • TodoNext - the number of items to do at the next depth

      • LoadAttempted1Min - the average items per minute attempted, weighted towards the last minute

      • LoadSaved1Min - the average items per minute saved, weighted towards the last minute

      • LoadAttempted15Min - the average items per minute attempted, weighted towards the last 15 minutes

      • LoadSaved15Min - the average items per minute saved, weighted towards the last 15 minutes

      • LoadAttempted1Hour - the average items per minute attempted, weighted towards the last hour

      • LoadSaved1Hour - the average items per minute saved, weighted towards the last hour

getTask retrieves information about a specific task that is running or has been run. The id likely comes from a previous getTasks call, where checking again can be done more efficiently by giving the id exactly rather than the same criteria to getTasks.


Copyright © Thunderstone Software     Last updated: Mar 7 2019
Copyright © 2019 Thunderstone Software LLC. All rights reserved.