Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
fanxing3
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5fb71365
authored
May 08, 2025
by
毛树良
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
<fix>:注意特殊:繁星3.0:如果已经用了大于等于15个资源时,认为资源占用完了
1 parent
a56bc9bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
fanxing-task/src/main/java/com/viontech/fanxing/task/service/VAServerService.java
fanxing-task/src/main/java/com/viontech/fanxing/task/service/VAServerService.java
View file @
5fb7136
...
@@ -338,12 +338,23 @@ public class VAServerService {
...
@@ -338,12 +338,23 @@ public class VAServerService {
status
.
put
(
"platType"
,
vaServer
.
getPlatType
());
status
.
put
(
"platType"
,
vaServer
.
getPlatType
());
status
.
put
(
"softVersion"
,
vaServer
.
getSoftVersion
());
status
.
put
(
"softVersion"
,
vaServer
.
getSoftVersion
());
status
.
put
(
"algoVersion"
,
vaServer
.
getAlgoVersion
());
status
.
put
(
"algoVersion"
,
vaServer
.
getAlgoVersion
());
status
.
put
(
"availableResource"
,
vaServer
.
getAvailableResources
());
// status.put("availableResource", vaServer.getAvailableResources());
// 问题:显示一个容器有20个分析资源,添加任务时分析资源超过15后会出现任务分析异常;項目上要求15个就当资源消耗完了,页面显示资源使用完了;
// 因此这里修改显示逻辑,如果已经用了大于等于15个资源时,认为资源占用完了
Float
usedResourceShow
=
vaServer
.
getVideoResource
()
-
vaServer
.
getAvailableResources
();
Float
availableResourcesShow
=
vaServer
.
getAvailableResources
();
if
(
vaServer
.
getVideoResource
()
==
20
&&
usedResourceShow
>=
15
)
{
usedResourceShow
=
vaServer
.
getVideoResource
();
availableResourcesShow
=
0
f
;
// 用一个新字段存储真实可用的资源数,方便排查问题
status
.
put
(
"avre"
,
vaServer
.
getAvailableResources
());
}
status
.
put
(
"availableResource"
,
availableResourcesShow
);
status
.
put
(
"videoResource"
,
vaServer
.
getVideoResource
());
status
.
put
(
"videoResource"
,
vaServer
.
getVideoResource
());
VaServerOverViewModel
model
=
map
.
computeIfAbsent
(
ip
,
x
->
new
VaServerOverViewModel
());
VaServerOverViewModel
model
=
map
.
computeIfAbsent
(
ip
,
x
->
new
VaServerOverViewModel
());
model
.
setIp
(
ip
).
addInfo
(
status
);
model
.
setIp
(
ip
).
addInfo
(
status
);
model
.
addTotal
(
vaServer
.
getVideoResource
()).
addUsed
(
vaServer
.
getVideoResource
()
-
vaServer
.
getAvailableResources
()
);
model
.
addTotal
(
vaServer
.
getVideoResource
()).
addUsed
(
usedResourceShow
);
}
}
return
map
.
values
();
return
map
.
values
();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment