Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
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
tsai
CAP
Commits
0e0fada1
Commit
0e0fada1
authored
Jun 17, 2019
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup
parent
a4f440dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
IProcessor.NeedRetry.cs
src/DotNetCore.CAP/Processor/IProcessor.NeedRetry.cs
+4
-6
No files found.
src/DotNetCore.CAP/Processor/IProcessor.NeedRetry.cs
View file @
0e0fada1
// Copyright (c) .NET Core Community. All rights reserved.
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Logging
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Logging
;
namespace
DotNetCore.CAP.Processor
namespace
DotNetCore.CAP.Processor
{
{
...
@@ -48,21 +48,19 @@ namespace DotNetCore.CAP.Processor
...
@@ -48,21 +48,19 @@ namespace DotNetCore.CAP.Processor
private
async
Task
ProcessPublishedAsync
(
IStorageConnection
connection
,
ProcessingContext
context
)
private
async
Task
ProcessPublishedAsync
(
IStorageConnection
connection
,
ProcessingContext
context
)
{
{
var
messages
=
await
GetSafelyAsync
(
()
=>
connection
.
GetPublishedMessagesOfNeedRetry
()
);
var
messages
=
await
GetSafelyAsync
(
connection
.
GetPublishedMessagesOfNeedRetry
);
foreach
(
var
message
in
messages
)
foreach
(
var
message
in
messages
)
{
{
await
_publishMessageSender
.
SendAsync
(
message
);
await
_publishMessageSender
.
SendAsync
(
message
);
context
.
ThrowIfStopping
();
await
context
.
WaitAsync
(
_delay
);
await
context
.
WaitAsync
(
_delay
);
}
}
}
}
private
async
Task
ProcessReceivedAsync
(
IStorageConnection
connection
,
ProcessingContext
context
)
private
async
Task
ProcessReceivedAsync
(
IStorageConnection
connection
,
ProcessingContext
context
)
{
{
var
messages
=
await
GetSafelyAsync
(
()
=>
connection
.
GetReceivedMessagesOfNeedRetry
()
);
var
messages
=
await
GetSafelyAsync
(
connection
.
GetReceivedMessagesOfNeedRetry
);
foreach
(
var
message
in
messages
)
foreach
(
var
message
in
messages
)
{
{
...
...
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