首页 > 数字化转型 > ERP > 如何控制批处理服务器
介绍
批处理服务器现在由 Syracuse 平台管理。这意味着您可以使用 HTTP 或 https 模式以及一组控制它的 URL 来访问服务。任何工具都可以使用不同的语法。
您可以通过多种方式执行此操作:
1.
列出批处理服务器,然后调用
API
进行访问
2.
通过其
代码
直接访问批处理服务器
3.
使用批处理服务器调度程序
1. 列出批处理服务器,然后调用 API 来访问它们
获取批处理服务器列表(如果有多个)。
将
myserv
:
port
作为服务器主机名或地址以及
Syracuse Web
服务器使用的
TCP
端口,
URL
将为:
在上面的 URL 中,可以从 http 客户端使用 / api1 / 段,该客户端传输身份验证(例如 curl 或 postman )。它将会话作为 Web 服务进行管理。通过 Web 客户端进行身份验证时,可以将 / api1 / 替换为 / sdata / 。
请求的结果类似于此提要。在这种情况下,该
$resource
数组包含该
$key
值标识的批处理服务器列表。的
status
也被进料中所示
。
{
"$url" : "http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers?representation=batchServer.%24query" ,
"$descriptor" : "batchServers" ,
"$startIndex" : 1 ,
"$itemsPerPage" : 20 ,
"$totalResults" : 1 ,
"$ui" : "http://192.168.3.141:8124/syracuse-main/html/main.html#ui=http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers/$ui/master&data=http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers" ,
"$resources" : [
{
"$uuid" : "39bf6186-37dd-49ca-ac20-c9a5af8fe705" ,
"$key" : "39bf6186-37dd-49ca-ac20-c9a5af8fe705" ,
"$etag" : 1 ,
"$creUser" : "admin" ,
"$creDate" : "2019-12-22T07:24:39.619Z" ,
"$updUser" : "admin" ,
"$updDate" : "2020-08-07T00:36:50.404Z" ,
"$properties" : {
"maxDelay" : {
"$isDisabled" : false
},
"killOverTime" : {
"$isDisabled" : false
},
"execInterval" : {
"$isDisabled" : false
}
},
"$url" : "/sdata/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')?representation=batchServer.$details" ,
"$shortUrl" : "/sdata/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')" ,
"status" : "stopped" ,
"maxDelay" : 0 ,
"killOverTime" : 30 ,
"execInterval" : 30 ,
"auto" : true ,
"code" : "ERP" ,
"runtimes" : [
{
"$uuid" : "e8666836-85e7-4e63-8f54-6a8a985c10b8" ,
"$key" : "e8666836-85e7-4e63-8f54-6a8a985c10b8" ,
"$etag" : 1 ,
"$creUser" : "admin" ,
"$updUser" : "admin" ,
"$updDate" : "2019-12-22T12:19:45.034Z" ,
"$properties" : {},
"$parent_uuid" : "39bf6186-37dd-49ca-ac20-c9a5af8fe705" ,
"maxQueries" : 5 ,
"serverPort" : 20100 ,
"serverHost" : "syracuseb" ,
"description" : "syracuseb:20100" ,
"$links" : {},
"$value" : "syracuseb:20100"
}
],
"localePref" : {
"$uuid" : "ab378c10-6915-4cfe-8f1e-44b59824bebd" ,
"$key" : "ab378c10-6915-4cfe-8f1e-44b59824bebd" ,
"description" : "English (United States)"
},
"role" : {
"$uuid" : "58dd4404-e0cc-400c-856a-6824f09f1447" ,
"$key" : "58dd4404-e0cc-400c-856a-6824f09f1447" ,
"description" : "Super administrator"
},
"user" : {
"$uuid" : "535cf2da-9472-45f8-b505-068138598317" ,
"$key" : "535cf2da-9472-45f8-b505-068138598317" ,
"login" : "admin" ,
"firstName" : "" ,
"lastName" : " 系统管理员 "
},
"refEndpoint" : {
"$uuid" : "55fac56e-9f7e-454e-90bc-e5143ccdee5d" ,
"$key" : "55fac56e-9f7e-454e-90bc-e5143ccdee5d" ,
"description" : "X3 / X3" ,
"nature" : null
},
"x3solution" : {
"$uuid" : "5125619c-c8e6-40d9-b139-a95e29b943b2" ,
"$key" : "5125619c-c8e6-40d9-b139-a95e29b943b2" ,
"solutionName" : "X3"
},
"$links" : {
"x3traces" : {
"$title" : "X3 server traces" ,
"$url" : "/sdata/x3/erp/X3_X3/$service/upload?fileName=[SRV]/TRA/serveur.tra&type=1&$format=txt" ,
"$method" : "GET" ,
"$isDisabled" : false ,
"$description" : null
},
"start" : {
"$isDisabled" : false
},
"stop" : {
"$isDisabled" : true
},
"stopAll" : {
"$isDisabled" : true
},
"queries" : {
"$isDisabled" : false
}
},
"$value" : "ERP" ,
"refUrl" : "/sdata/x3/erp/X3_X3"
}
],
"$links" : {},
"$template" : {
"$url" : "http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers/$template"
},
"$prototype" : "{$baseUrl}/$prototypes('batchServer.$query')"
}
将
$key
到一批服务器识别相关的实例。它将替换以下
URL
中的单词
KEY
。
注:这里的KEY 就是上面查询到的KEY 值
启动batchServer, 界面手工怎么也起不来
{
"$uuid" : "39bf6186-37dd-49ca-ac20-c9a5af8fe705" ,
"$key" : "39bf6186-37dd-49ca-ac20-c9a5af8fe705" ,
"$etag" : 1 ,
"$creUser" : "admin" ,
"$creDate" : "2019-12-22T07:24:39.619Z" ,
"$updUser" : "admin" ,
"$updDate" : "2020-08-09T08:13:53.855Z" ,
"$properties" : {
"status" : {
"$diagnoses" : []
},
"maxDelay" : {
"$isDisabled" : true
},
"killOverTime" : {
"$isDisabled" : true
},
"execInterval" : {
"$isDisabled" : true
}
},
"$url" : "/sdata/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')?representation=batchServer.$details" ,
"$shortUrl" : "/sdata/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')" ,
"$diagnoses" : [
{
"$datetime" : "2020-08-09T08:35:43.914Z" ,
"$severity" : "info" ,
"$message" : " 新客户端已创建于 syracuseb:20100 的 2296 上 "
},
{
"$datetime" : "2020-08-09T08:35:43.914Z" ,
"$severity" : "info" ,
"$message" : " 已将 runtime 'syracuseb:20100' 加入至批处理控制器的服务器列表,且该 runtime 将同时处理 5 条请求。 "
},
{
"$severity" : "info" ,
"$message" : " 服务器批次为 starting"
}
],
"status" : "starting" ,
"maxDelay" : 0 ,
"killOverTime" : 30 ,
"execInterval" : 30 ,
"auto" : true ,
"code" : "ERP" ,
"runtimes" : [
{
"$uuid" : "e8666836-85e7-4e63-8f54-6a8a985c10b8" ,
"$key" : "e8666836-85e7-4e63-8f54-6a8a985c10b8" ,
"$etag" : 1 ,
"$creUser" : "admin" ,
"$updUser" : "admin" ,
"$updDate" : "2019-12-22T12:19:45.034Z" ,
"$properties" : {},
"$parent_uuid" : "39bf6186-37dd-49ca-ac20-c9a5af8fe705" ,
"maxQueries" : 5 ,
"serverPort" : 20100 ,
"serverHost" : "syracuseb" ,
"description" : "syracuseb:20100" ,
"$links" : {},
"$value" : "syracuseb:20100"
}
],
"localePref" : {
"$uuid" : "ab378c10-6915-4cfe-8f1e-44b59824bebd" ,
"$key" : "ab378c10-6915-4cfe-8f1e-44b59824bebd" ,
"description" : "English (United States)"
},
"role" : {
"$uuid" : "58dd4404-e0cc-400c-856a-6824f09f1447" ,
"$key" : "58dd4404-e0cc-400c-856a-6824f09f1447" ,
"description" : "Super administrator"
},
"user" : {
"$uuid" : "535cf2da-9472-45f8-b505-068138598317" ,
"$key" : "535cf2da-9472-45f8-b505-068138598317" ,
"login" : "admin" ,
"firstName" : "" ,
"lastName" : " 系统管理员 "
},
"refEndpoint" : {
"$uuid" : "55fac56e-9f7e-454e-90bc-e5143ccdee5d" ,
"$key" : "55fac56e-9f7e-454e-90bc-e5143ccdee5d" ,
"description" : "X3 / X3" ,
"nature" : null
},
"x3solution" : {
"$uuid" : "5125619c-c8e6-40d9-b139-a95e29b943b2" ,
"$key" : "5125619c-c8e6-40d9-b139-a95e29b943b2" ,
"solutionName" : "X3"
},
"$links" : {
"x3traces" : {
"$title" : "X3 server traces" ,
"$url" : "/sdata/x3/erp/X3_X3/$service/upload?fileName=[SRV]/TRA/serveur.tra&type=1&$format=txt" ,
"$method" : "GET" ,
"$isDisabled" : false ,
"$description" : null
},
"start" : {
"$isDisabled" : true
},
"stop" : {
"$isDisabled" : false
},
"stopAll" : {
"$isDisabled" : false
},
"queries" : {
"$isDisabled" : false
}
},
"$value" : "ERP" ,
"refUrl" : "/sdata/x3/erp/X3_X3"
}
查看状态, 启动成功
停止
查看状态
停止所有
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69955479/viewspace-2731755/ ,如需转载,请注明出处,否则将追究法律责任。