Specialized Administration > Supporting Visualization and Publishing > WVS Publisher > Publisher Queues and Jobs > Using Dedicated Publish Queues > Submitting Publish Jobs to Dedicated Publish Queues with Specific Priority
  
Submitting Publish Jobs to Dedicated Publish Queues with Specific Priority
In WVS, there is a custom hook that allows the priority to be specified as an alternative to the standard method based on the properties in wvs.properties. If the priority has been specified on the API submitting the publish job, then that priority is passed to the custom hook, so the custom code can decide whether to use it. If the custom hook is defined and the hook method returns one of the strings “H”, “M” or “L”, then that indicates the priority to be used; if the return is null, then the mechanism based on the wvs.properties entries (or the one specified when the job was submitted) is used to determine the priority. Note that the same hook is used to specify the queue set to be used.
It is also possible to add additional sets of queues to the current prefix of “PublisherQueue”. A specific publish job can now be submitted to these sets of queues rather than the default one. The requisite queues are created as part of the system startup — for example, the H/M/L and “1” queues for a set are created, and additional numbered queues can be created manually. It is also necessary to add the appropriate wt.queue.removeCompleted properties for all numbered queues created for additional queue sets. The capability to submit job to a specific queue set is available from the API that submits a publish job, and not from the out-of-the-box UI
Another custom hook allows you to specify the queue set to be used. If the queue set has been specified on the API submitting the publish job, then that is passed to the custom hook, so the custom code can decide whether to use that one, or another specified queue set. If the custom hook is defined and the hook method returns a string that matches one of the queue set names specified by the property publish.publishqueue.setnames, then that set is used for the publish job. If the return is any other string (including null) then the standard queue set (or that defined by wvs.properties) is used. Note that the same hook also specifies the priority to be used. The following is an example of how this works:
On submitting a publish job, the queue “set” name is specified as “XXX”. Those queues with the additional prefix of “XXX” are then used in the normal way, e.g. “PublisherQueueXXXH/ PublisherQueueXXXM/ PublisherQueueXXXL” and the numbered queues, “PublisherQueueXXX1” etc.
If additional queue sets are used, those queues are created as required, however, you must specify the properties in wt.properties to preserve completed queue entries for those queues.
You can also define which queue set is used for different types of publish jobs, by setting properties in wvs.properties following the same style as used for defining queue priorities by properties.
The custom hook that is used for setting priority and/or queue set can also set the name and/or description for the representation to be created.