Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
signal
traffic-signal-platform
Commits
5af7d9e6
Commit
5af7d9e6
authored
Aug 16, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 优化东土实时数据调用
parent
ee9bf979
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
RealTimeTask.java
...ice/src/main/java/net/wanji/utc/dt/task/RealTimeTask.java
+3
-1
No files found.
signal-utc-dt-service/src/main/java/net/wanji/utc/dt/task/RealTimeTask.java
View file @
5af7d9e6
...
@@ -11,6 +11,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
...
@@ -11,6 +11,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -23,10 +24,11 @@ public class RealTimeTask {
...
@@ -23,10 +24,11 @@ public class RealTimeTask {
@Resource
(
name
=
"commonThreadPoolExecutor"
)
@Resource
(
name
=
"commonThreadPoolExecutor"
)
ThreadPoolTaskExecutor
commonThreadPoolExecutor
;
ThreadPoolTaskExecutor
commonThreadPoolExecutor
;
@Scheduled
(
initialDelay
=
60
*
1000
,
fixedRate
=
60
*
1000
)
@Scheduled
(
initialDelay
=
60
*
1000
,
fixedRate
=
1000
)
public
void
getRealTimeLightStatus
()
throws
Exception
{
public
void
getRealTimeLightStatus
()
throws
Exception
{
Map
<
String
,
CrossInfoPO
>
crossInfoCache
=
CrossInfoCache
.
getCrossInfoCache
();
Map
<
String
,
CrossInfoPO
>
crossInfoCache
=
CrossInfoCache
.
getCrossInfoCache
();
if
(!
crossInfoCache
.
isEmpty
())
{
if
(!
crossInfoCache
.
isEmpty
())
{
System
.
err
.
println
(
new
Date
());
for
(
Map
.
Entry
<
String
,
CrossInfoPO
>
entry
:
crossInfoCache
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
CrossInfoPO
>
entry
:
crossInfoCache
.
entrySet
())
{
String
crossId
=
entry
.
getKey
();
String
crossId
=
entry
.
getKey
();
commonThreadPoolExecutor
.
execute
(()
->
{
commonThreadPoolExecutor
.
execute
(()
->
{
...
...
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