This class allows you to modify and view the [WorkQueues] section of the CPF file through programatic APIs. More...
Public Attributes | |
AlwaysQueue | |
If true makes this a true queue where you need to wait for the work group request to get to the head of the. More... | |
DefaultWorkers | |
When a work group in this category is created and no worker job count is specified this is the default number of worker jobs. More... | |
MaxActiveWorkers | |
Maximum number of active worker jobs we will keep in the pool of jobs servicing requests in this category. More... | |
MaxTotalWorkers | |
If none-zero specifies the maximum number of workers we will start in this category. More... | |
MaxWorkers | |
When a work group in this category is created specifying the number of worker jobs wanted and the number requested is. More... | |
![]() | |
CPFFile | |
CPF file which the object maps to. More... | |
Comments | |
Embedded comments in the CPF file. More... | |
Flags | |
Flags governing how the object is processed when Save() is called. More... | |
Name | |
Name of the object instance. More... | |
Static Public Attributes | |
CAPITALNAME = None | |
WorkQueue name is not capitalized. More... | |
![]() | |
CAPITALNAME = None | |
Determines if the Name specified in the index should be capitalized. More... | |
SECTIONTYPE = None | |
This parameter governs how the class creates audit records. More... | |
![]() | |
DOMAIN = None | |
This class contains properties which are included by classes which manipulate sections in the CPF file. More... | |
This class allows you to modify and view the [WorkQueues] section of the CPF file through programatic APIs.
While properties are usually modified through the System Management portal, there may be some occasion where modifying them through the API's is best for your system. In all the Config methods, if you do not specify the CPFFile parameter, the currently active CPF file is used. If you wish to modify a CPF file which is not the currently active one, then specify the CPFFile you wish to modify in the method call.
The Flags parameter does not normally need to be specified; the defaults are usually sufficient for most cases.
You can use either the provided API's (Create/Get/Modify/Delete) to modify the properties by passing in the correct parameters, or use Object syntax to open and directly manipulate the config objects (Open() and Exists()). Most objects created here need only to specify the Name of the object, and 1 or 2 properties since the the defaults are what are commonly used for most cases.
EXAMPLE:
; Use class methods to create an instance SYS>s Name="TEST" SYS>s Properties("MaxActiveWorkers")=8 SYS>s Status=##Class(Config.WorkQueues).Create(Name,.Properties) SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status) ; Use class methods to modify properties SYS>s Status=##Class(Config.WorkQueues).Get(Name,.Properties) SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status) SYS>zw Properties Properties("DefaultWorkers")=0 Properties("MaxWorkers")=0 Properties("MaxActiveWorkers")=8 SYS>s Properties("MaxActiveWorkers")=4 SYS>s Status=##Class(Config.WorkQueues).Modify(Name,.Properties) SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status) ; Now use Objects to modify properties SYS>s Obj=##Class(Config.WorkQueues).Open(Name) ; We could have used i ##Class(Config.WorkQueues).Exists(Name,.Obj) instead of Open() SYS>w Obj.MaxActiveWorkers 4 SYS>s Obj.MaxWorkers=2 SYS>s Status=Obj.Save() SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status) ; Now delete the object we just created SYS>s Status=##Class(Config.WorkQueues).Delete(Name) SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status)
|
static |
WorkQueue name is not capitalized.
AlwaysQueue |
If true makes this a true queue where you need to wait for the work group request to get to the head of the.
queue in order to get a worker assigned. When AlwaysQueue=0 for a category when a new WQM group is created we allocated at least one worker immediately to make progress on the work even if the rest of the work unit are in a queue waiting for additional workers to free up.
DefaultWorkers |
When a work group in this category is created and no worker job count is specified this is the default number of worker jobs.
we will assign to the group. 0 = Dynamic.
MaxActiveWorkers |
Maximum number of active worker jobs we will keep in the pool of jobs servicing requests in this category.
Idle jobs are detected and new jobs are started automatically to keep the maximum active job number around this limit. 0 = Dynamic, -1 = unlimited.
MaxTotalWorkers |
If none-zero specifies the maximum number of workers we will start in this category.
Even if all existing workers are blocked we will not start more workers once we reach this limit. This is useful for IO intensive workloads where we expect workers to be blocked and are not trying to control the amount of CPU a worker uses.
MaxWorkers |
When a work group in this category is created specifying the number of worker jobs wanted and the number requested is.
greater than this limit then we will use this limit value instead. 0 = Dynamic