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 3ac5ed89
authored
Jul 21, 2022
by
毛树良
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:资源支持动态修改
1 parent
21644c07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 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 @
3ac5ed8
...
@@ -55,7 +55,13 @@ public class VAServerService {
...
@@ -55,7 +55,13 @@ public class VAServerService {
public
void
registerVAServer
(
VaServerInfo
vaServerInfo
)
{
public
void
registerVAServer
(
VaServerInfo
vaServerInfo
)
{
String
devId
=
vaServerInfo
.
getDevID
();
String
devId
=
vaServerInfo
.
getDevID
();
VaServerInfo
vaServer
=
vaServerRedisRepository
.
getVAServerInfoById
(
devId
);
VaServerInfo
vaServer
=
vaServerRedisRepository
.
getVAServerInfoById
(
devId
);
Float
availableResources
=
vaServer
==
null
?
vaServerInfo
.
getVideoResource
()
:
vaServer
.
getAvailableResources
();
Float
availableResources
=
null
;
if
(
vaServer
==
null
)
{
availableResources
=
vaServerInfo
.
getVideoResource
();
}
else
{
Float
incrVal
=
vaServerInfo
.
getVideoResource
()
-
vaServer
.
getVideoResource
();
availableResources
=
vaServer
.
getAvailableResources
()
+
incrVal
;
}
vaServerInfo
.
setAvailableResources
(
availableResources
);
vaServerInfo
.
setAvailableResources
(
availableResources
);
vaServerRedisRepository
.
addOrUpdate
(
devId
,
vaServerInfo
);
vaServerRedisRepository
.
addOrUpdate
(
devId
,
vaServerInfo
);
keepalive
(
devId
);
keepalive
(
devId
);
...
...
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