Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
1782ed8b
Commit
1782ed8b
authored
Jun 18, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正redis 最大连接数
parent
1dd270eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java
...aemon/applicationservice/DeviceSendThirdPartyService.java
+6
-14
No files found.
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java
View file @
1782ed8b
package
com.mortals.xhx.daemon.applicationservice
;
package
com.mortals.xhx.daemon.applicationservice
;
import
cn.hutool.core.net.url.UrlBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.springcloud.service.IApplicationStartedService
;
import
com.mortals.framework.springcloud.service.IApplicationStartedService
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.busiz.rsp.ApiResp
;
import
com.mortals.xhx.common.pdu.DeviceReq
;
import
com.mortals.xhx.common.utils.SendTaskThreadPool
;
import
com.mortals.xhx.common.utils.SendTaskThreadPool
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
Constant
.
PARAM_SERVER_PHP_IN_HTTP_URL
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
Constant
.
SEND_INTEVEL
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
Constant
.
SEND_INTEVEL
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_DEVICE_THIRDPARTY_QUEUE
;
@Component
@Component
@Slf4j
@Slf4j
...
@@ -45,12 +37,12 @@ public class DeviceSendThirdPartyService implements IApplicationStartedService {
...
@@ -45,12 +37,12 @@ public class DeviceSendThirdPartyService implements IApplicationStartedService {
int
waitTime
=
SEND_INTEVEL
;
int
waitTime
=
SEND_INTEVEL
;
while
(!
stopped
)
{
while
(!
stopped
)
{
try
{
try
{
DeviceReq
deviceReq
=
cacheService
.
lpop
(
KEY_DEVICE_THIRDPARTY_QUEUE
,
DeviceReq
.
class
);
//
DeviceReq deviceReq = cacheService.lpop(KEY_DEVICE_THIRDPARTY_QUEUE, DeviceReq.class);
if
(!
ObjectUtils
.
isEmpty
(
deviceReq
))
{
//
if (!ObjectUtils.isEmpty(deviceReq)) {
String
phpInUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_IN_HTTP_URL
,
"http://172.15.28.116:8090"
);
//
String phpInUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_IN_HTTP_URL, "http://172.15.28.116:8090");
ApiResp
<
String
>
resp
=
messageService
.
sendThirdParty
(
UrlBuilder
.
of
(
phpInUrl
).
addPath
(
thirdPartyPath
).
build
(),
deviceReq
);
//
ApiResp<String> resp = messageService.sendThirdParty(UrlBuilder.of(phpInUrl).addPath(thirdPartyPath).build(), deviceReq);
log
.
info
(
"sendThirty resp ==>{}"
,
JSON
.
toJSONString
(
resp
));
//
log.info("sendThirty resp ==>{}", JSON.toJSONString(resp));
}
//
}
// try {
// try {
// Thread.sleep(waitTime);
// Thread.sleep(waitTime);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment