QueueSystem.SetQueueConfiguration 方法
将 Project Server 队列服务中的指定的队列配置设置。
命名空间: WebSvcQueueSystem
程序集: ProjectServerServices(位于 ProjectServerServices.dll 中)
语法
声明
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/SetQueueConfiguration", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub SetQueueConfiguration ( _
queueId As QueueID, _
name As String, _
value As String _
)
用法
Dim instance As QueueSystem
Dim queueId As QueueID
Dim name As String
Dim value As String
instance.SetQueueConfiguration(queueId, _
name, value)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/SetQueueConfiguration", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void SetQueueConfiguration(
QueueID queueId,
string name,
string value
)
参数
queueId
类型:WebSvcQueueSystem.QueueIDProjectQ或TimesheetQ值QueueID枚举之一。
name
类型:System.String队列设置的名称。
value
类型:System.String队列设置的值。
备注
有关最小值,最大值和默认值,请参阅Project Web App (https://ServerName/ProjectServerName/_layouts/pwa/Admin/queuesettings.aspx) 中的队列设置页。
Project Server 权限
权限 |
说明 |
---|---|
允许用户管理 Project Server 队列。全局权限。 |
示例
下面的代码示例将设置时间表队列轮询间隔为 2 秒。SetQueueConfiguration可以设置队列中的任何一个可以使用ReadQueueConfiguration方法获取的配置设置。
. . .
QueueSystemWS.QueueID qType = QueueSystemWS.QueueID.TimesheetQ;
string qSettingName = "PollingInterval";
string qSettingValue = "2000";
string qConfig = q.SetQueueConfiguration(qType, qSettingName, qSettingValue);
以下是ReadQueueConfiguration时间表队列的默认结果。
<?xml version="1.0" encoding="utf-8"?>
<queueconfigurationsettings>
<setting name="MaxThreads" value="4" />
<setting name="QueueTimeout" value="3" />
<setting name="MsgRetryInterval" value="1000" />
<setting name="MsgRetryLimit" value="5" />
<setting name="GrpRetryLimit" value="5" />
<setting name="SqlRetryInterval" value="1000" />
<setting name="SqlRetryLimit" value="5" />
<setting name="PollingInterval" value="1000" />
<setting name="RestartThrottle" value="60000" />
<setting name="EnablePerfMon" value="1" />
<setting name="PeriodicTasksInterval" value="10000" />
<setting name="CleanupSuccessAgeLimit" value="24" />
<setting name="CleanupNonSuccessAgeLimit" value="168" />
<setting name="CleanupInterval" value="24" />
<setting name="CleanupIntervalOffset" value="0" />
<setting name="SqlCommandTimeout" value="1800" />
<setting name="FastPolling" value="1" />
</queueconfigurationsettings>