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
3740261a
Commit
3740261a
authored
Aug 03, 2017
by
yangxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor.
parent
7454bf53
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
15 deletions
+15
-15
CAP.EFOptions.cs
src/DotNetCore.CAP.MySql/CAP.EFOptions.cs
+1
-1
CAP.RabbiMQOptions.cs
src/DotNetCore.CAP.RabbitMQ/CAP.RabbiMQOptions.cs
+5
-5
RabbitMQConsumerClient.cs
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
+1
-1
CAP.EFOptions.cs
src/DotNetCore.CAP.SqlServer/CAP.EFOptions.cs
+1
-1
CAP.Options.cs
src/DotNetCore.CAP/CAP.Options.cs
+6
-6
IProcessor.FailedJob.cs
src/DotNetCore.CAP/Processor/IProcessor.FailedJob.cs
+1
-1
No files found.
src/DotNetCore.CAP.MySql/CAP.EFOptions.cs
View file @
3740261a
...
...
@@ -8,6 +8,6 @@ namespace DotNetCore.CAP
/// <summary>
/// EF dbcontext type.
/// </summary>
public
Type
DbContextType
{
get
;
internal
set
;
}
internal
Type
DbContextType
{
get
;
set
;
}
}
}
\ No newline at end of file
src/DotNetCore.CAP.RabbitMQ/CAP.RabbiMQOptions.cs
View file @
3740261a
...
...
@@ -33,12 +33,12 @@ namespace DotNetCore.CAP
/// </summary>
public
const
string
DefaultExchangeName
=
"cap.default.topic"
;
/// <summary> The topic exchange type. </summary>
public
const
string
ExchangeType
=
"topic"
;
/// <summary>The host to connect to.</summary>
public
string
HostName
{
get
;
set
;
}
=
"localhost"
;
/// <summary> The topic exchange type. </summary>
internal
const
string
ExchangeType
=
"topic"
;
/// <summary>
/// Password to use when authenticating to the server.
/// </summary>
...
...
@@ -80,8 +80,8 @@ namespace DotNetCore.CAP
public
int
Port
{
get
;
set
;
}
=
-
1
;
/// <summary>
/// Gets or sets queue message automatic deletion time
. Default 10 days
.
/// Gets or sets queue message automatic deletion time
(in milliseconds). Default 864000000 ms (10 days)
.
/// </summary>
public
TimeSpan
XMessageTTL
{
get
;
set
;
}
=
TimeSpan
.
FromDays
(
10
)
;
public
int
QueueMessageExpires
{
get
;
set
;
}
=
864000000
;
}
}
\ No newline at end of file
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
View file @
3740261a
...
...
@@ -54,7 +54,7 @@ namespace DotNetCore.CAP.RabbitMQ
type
:
RabbitMQOptions
.
ExchangeType
,
durable
:
true
);
var
arguments
=
new
Dictionary
<
string
,
object
>
{
{
"x-message-ttl"
,
(
int
)
_rabbitMQOptions
.
XMessageTTL
.
TotalMillisecond
s
}
};
var
arguments
=
new
Dictionary
<
string
,
object
>
{
{
"x-message-ttl"
,
(
int
)
_rabbitMQOptions
.
QueueMessageExpire
s
}
};
_channel
.
QueueDeclare
(
_queueName
,
durable
:
true
,
exclusive
:
false
,
...
...
src/DotNetCore.CAP.SqlServer/CAP.EFOptions.cs
View file @
3740261a
...
...
@@ -16,6 +16,6 @@ namespace DotNetCore.CAP
/// <summary>
/// EF dbcontext type.
/// </summary>
public
Type
DbContextType
{
get
;
internal
set
;
}
internal
Type
DbContextType
{
get
;
set
;
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/CAP.Options.cs
View file @
3740261a
...
...
@@ -40,18 +40,18 @@ namespace DotNetCore.CAP
/// <summary>
/// Failed messages polling delay time. Default is 3 min.
/// </summary>
public
TimeSpan
FailedMessageWaitingInterval
=
TimeSpan
.
FromMinutes
(
3
)
;
public
int
FailedMessageWaitingInterval
{
get
;
set
;
}
=
(
int
)
TimeSpan
.
FromMinutes
(
3
).
TotalSeconds
;
/// <summary>
/// We’ll invoke this call-back with message type,name,content when requeue failed message.
/// </summary>
public
Action
<
Models
.
MessageType
,
string
,
string
>
FailedCallback
{
get
;
set
;
}
public
Action
<
Models
.
MessageType
,
string
,
string
>
FailedCallback
{
get
;
set
;
}
/// <summary>
/// Registers an extension that will be executed when building services.
/// </summary>
/// <param name="extension"></param>
public
void
RegisterExtension
(
ICapOptionsExtension
extension
)
/// Registers an extension that will be executed when building services.
/// </summary>
/// <param name="extension"></param>
public
void
RegisterExtension
(
ICapOptionsExtension
extension
)
{
if
(
extension
==
null
)
throw
new
ArgumentNullException
(
nameof
(
extension
));
...
...
src/DotNetCore.CAP/Processor/IProcessor.FailedJob.cs
View file @
3740261a
...
...
@@ -27,7 +27,7 @@ namespace DotNetCore.CAP.Processor
_logger
=
logger
;
_provider
=
provider
;
_stateChanger
=
stateChanger
;
_waitingInterval
=
_options
.
FailedMessageWaitingInterval
;
_waitingInterval
=
TimeSpan
.
FromSeconds
(
_options
.
FailedMessageWaitingInterval
)
;
}
public
async
Task
ProcessAsync
(
ProcessingContext
context
)
...
...
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