Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
ec440f37
Commit
ec440f37
authored
Nov 25, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
862ca1cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
performance/Performance.Api/Controllers/ModExtractController.cs
+1
-1
performance/Performance.Services/Queues/IHubNotificationQueue.cs
+11
-11
No files found.
performance/Performance.Api/Controllers/ModExtractController.cs
View file @
ec440f37
...
@@ -48,7 +48,7 @@ public ApiResponse CustomExtract(int allotId)
...
@@ -48,7 +48,7 @@ public ApiResponse CustomExtract(int allotId)
}
}
else
else
{
{
scopedQueue
.
Send
(
new
Notification
(
allotId
,
"Notification"
,
new
UrlContent
(
"自定义数据提取数据失败"
,
resultFilePath
,
NotificationLevel
.
ERR
)));
scopedQueue
.
Send
(
new
Notification
(
allotId
,
"Notification"
,
new
TextContent
(
"自定义数据提取数据失败"
,
NotificationLevel
.
ERR
)));
}
}
await
Task
.
Delay
(
TimeSpan
.
FromSeconds
(
5
),
token
);
await
Task
.
Delay
(
TimeSpan
.
FromSeconds
(
5
),
token
);
...
...
performance/Performance.Services/Queues/IHubNotificationQueue.cs
View file @
ec440f37
...
@@ -72,30 +72,30 @@ public Notification(int userId, string method, PushContent body)
...
@@ -72,30 +72,30 @@ public Notification(int userId, string method, PushContent body)
public
abstract
class
PushContent
public
abstract
class
PushContent
{
{
protected
PushContent
(
string
conten
t
,
NotificationLevel
level
)
protected
PushContent
(
string
subjec
t
,
NotificationLevel
level
)
{
{
Content
=
conten
t
;
Subject
=
subjec
t
;
LogLevel
=
level
;
LogLevel
=
level
.
ToString
()
;
}
}
public
abstract
string
Type
{
get
;
}
public
abstract
string
Type
{
get
;
}
public
NotificationLevel
LogLevel
{
get
;
s
et
;
}
public
string
LogLevel
{
g
et
;
}
public
string
Time
{
get
=>
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
}
public
string
Time
{
get
=>
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
}
public
string
Conten
t
{
get
;
set
;
}
public
string
Subjec
t
{
get
;
set
;
}
}
}
}
}
public
class
EventContent
:
Notification
.
PushContent
public
class
EventContent
:
Notification
.
PushContent
{
{
public
EventContent
(
object
eventId
,
string
subject
,
string
content
,
NotificationLevel
level
=
NotificationLevel
.
INF
)
public
EventContent
(
object
eventId
,
string
subject
,
string
content
,
NotificationLevel
level
=
NotificationLevel
.
INF
)
:
base
(
conten
t
,
level
)
:
base
(
subjec
t
,
level
)
{
{
EventId
=
eventId
;
EventId
=
eventId
;
Subject
=
subjec
t
;
Content
=
conten
t
;
}
}
public
object
EventId
{
get
;
set
;
}
public
object
EventId
{
get
;
set
;
}
public
string
Subjec
t
{
get
;
set
;
}
public
string
Conten
t
{
get
;
set
;
}
public
override
string
Type
=>
"Event"
;
public
override
string
Type
=>
"Event"
;
}
}
...
@@ -111,11 +111,11 @@ public TextContent(string content, NotificationLevel level = NotificationLevel.I
...
@@ -111,11 +111,11 @@ public TextContent(string content, NotificationLevel level = NotificationLevel.I
public
class
UrlContent
:
Notification
.
PushContent
public
class
UrlContent
:
Notification
.
PushContent
{
{
public
UrlContent
(
string
subject
,
string
url
,
NotificationLevel
level
=
NotificationLevel
.
INF
)
public
UrlContent
(
string
subject
,
string
url
,
NotificationLevel
level
=
NotificationLevel
.
INF
)
:
base
(
url
,
level
)
:
base
(
subject
,
level
)
{
{
Subject
=
subject
;
Content
=
url
;
}
}
public
string
Subjec
t
{
get
;
set
;
}
public
string
Conten
t
{
get
;
set
;
}
public
override
string
Type
=>
"Url"
;
public
override
string
Type
=>
"Url"
;
}
}
}
}
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