Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
bltdc
data-center-auto
Commits
58b07a22
Commit
58b07a22
authored
Jul 10, 2019
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化缺货改零推送
parent
5aee2158
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
ShortagePushBackgroundService.cs
ShortagePush/ShortagePushBackgroundService.cs
+8
-0
No files found.
ShortagePush/ShortagePushBackgroundService.cs
View file @
58b07a22
...
@@ -17,6 +17,8 @@ namespace ShortagePush
...
@@ -17,6 +17,8 @@ namespace ShortagePush
Task
.
Factory
.
StartNew
(()
=>
{
Task
.
Factory
.
StartNew
(()
=>
{
while
(
true
)
while
(
true
)
{
{
try
{
System
.
Console
.
WriteLine
(
$"开始推送改零数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
System
.
Console
.
WriteLine
(
$"开始推送改零数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
new
ReportServices
().
ShortagePush
();
new
ReportServices
().
ShortagePush
();
System
.
Console
.
WriteLine
(
$"结束推送改零数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
System
.
Console
.
WriteLine
(
$"结束推送改零数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
...
@@ -24,6 +26,12 @@ namespace ShortagePush
...
@@ -24,6 +26,12 @@ namespace ShortagePush
System
.
Console
.
WriteLine
(
$"开始推送回货数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
System
.
Console
.
WriteLine
(
$"开始推送回货数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
new
ReportServices
().
ReturnGoodsPush
();
new
ReportServices
().
ReturnGoodsPush
();
System
.
Console
.
WriteLine
(
$"结束推送回货数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
System
.
Console
.
WriteLine
(
$"结束推送回货数据,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
catch
(
Exception
ex
)
{
Console
.
WriteLine
(
ex
.
Message
);
}
Thread
.
Sleep
(
5
*
60
*
1000
);
Thread
.
Sleep
(
5
*
60
*
1000
);
}
}
...
...
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