Difference between revisions of "Taskman Internals"

From VistApedia
Jump to: navigation, search
(Created page with "= Taskman components = Routines * %ZTLOAD (API to create a task) * Manager * Sub-manager * The menu options to use to manipulate Taskman Globals * %ZTSCH (the tasks "index" ...")
 
(Taskman components)
Line 10: Line 10:
 
* %ZTSCH (the tasks "index" plus control structures for taskman... not a Fileman file)
 
* %ZTSCH (the tasks "index" plus control structures for taskman... not a Fileman file)
 
* %ZTSK (Tasks Fileman file)
 
* %ZTSK (Tasks Fileman file)
 +
 +
== ^%ZTSK Structure ==
 +
^%ZTSK contains the actual task.
 +
 +
^%ZTSK(-1) contains the most recently assigned task.
 +
 +
.1 node: Current Status
 +
* 1 -> Scheduled by %ZTLOAD
 +
* 2 -> Not on any list
 +
* L -> Rejected
 +
* 3 -> In Job List
 +
* A -> In IO List
 +
* 4 -> Not on any index, but prepping
 +
* 5 -> On task list (i.e. running)
 +
* 6 -> Succeeded (NB: may not see this if task gets deleted immediately)
 +
 +
.2 node: IO
 +
 +
.3 node: Variables to use in the task
 +
 +
== ^%ZTSCH Structure ==
 +
^%ZTSCH has indexes on the task file. It decides when a task will be run.
 +
 +
^%ZTSCH(seconds, task number) is the index of what to do when. The number of seconds is since the $H epoch.
 +
 +
Once a task is ready to run,

Revision as of 18:59, 18 August 2015

Taskman components

Routines

  •  %ZTLOAD (API to create a task)
  • Manager
  • Sub-manager
  • The menu options to use to manipulate Taskman

Globals

  •  %ZTSCH (the tasks "index" plus control structures for taskman... not a Fileman file)
  •  %ZTSK (Tasks Fileman file)

^%ZTSK Structure

^%ZTSK contains the actual task.

^%ZTSK(-1) contains the most recently assigned task.

.1 node: Current Status

  • 1 -> Scheduled by %ZTLOAD
  • 2 -> Not on any list
  • L -> Rejected
  • 3 -> In Job List
  • A -> In IO List
  • 4 -> Not on any index, but prepping
  • 5 -> On task list (i.e. running)
  • 6 -> Succeeded (NB: may not see this if task gets deleted immediately)

.2 node: IO

.3 node: Variables to use in the task

^%ZTSCH Structure

^%ZTSCH has indexes on the task file. It decides when a task will be run.

^%ZTSCH(seconds, task number) is the index of what to do when. The number of seconds is since the $H epoch.

Once a task is ready to run,