Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
04615de7
Commit
04615de7
authored
Jul 28, 2023
by
xushaohua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:部署
parent
9f32954a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
InMemoryTaskStoreServiceImpl.java
...idjourney/service/store/InMemoryTaskStoreServiceImpl.java
+11
-9
No files found.
midjourney-proxy/src/main/java/com/github/novicezk/midjourney/service/store/InMemoryTaskStoreServiceImpl.java
View file @
04615de7
...
@@ -45,18 +45,20 @@ public class InMemoryTaskStoreServiceImpl implements TaskStoreService {
...
@@ -45,18 +45,20 @@ public class InMemoryTaskStoreServiceImpl implements TaskStoreService {
Task
task
=
this
.
taskMap
.
get
(
key
);
Task
task
=
this
.
taskMap
.
get
(
key
);
if
(
ObjectUtil
.
isNotNull
(
task
))
{
if
(
ObjectUtil
.
isNotNull
(
task
))
{
TaskStatus
status
=
task
.
getStatus
();
TaskStatus
status
=
task
.
getStatus
();
if
(
TaskStatus
.
SUCCESS
.
equals
(
status
))
{
if
(
TaskStatus
.
SUCCESS
.
equals
(
status
)
&&
StrUtil
.
isNotBlank
(
task
.
getImageUrl
())
&&
task
.
getImageUrl
().
contains
(
"cdn.discordapp.com"
)
)
{
// 将discord地址转换成华为云地址返回
// 将discord地址转换成华为云地址返回
if
(
task
.
getImageUrl
().
contains
(
"cdn.discordapp.com"
))
{
task
.
setImageUrl
(
fileUtil
.
convertFile
(
task
.
getImageUrl
()));
if
(
StrUtil
.
isNotBlank
(
task
.
getImageUrl
()))
{
task
.
setImageUrl
(
fileUtil
.
convertFile
(
task
.
getImageUrl
()));
}
}
}
}
try
{
try
{
task
.
setFinishDate
(
DateUtil
.
formatDateTime
(
new
Date
(
task
.
getFinishTime
())));
if
(
ObjectUtil
.
isNotNull
(
task
.
getFinishTime
()))
{
task
.
setSubmitDate
(
DateUtil
.
formatDateTime
(
new
Date
(
task
.
getSubmitTime
())));
task
.
setFinishDate
(
DateUtil
.
formatDateTime
(
new
Date
(
task
.
getFinishTime
())));
task
.
setStartDate
(
DateUtil
.
formatDateTime
(
new
Date
(
task
.
getStartTime
())));
}
if
(
ObjectUtil
.
isNotNull
(
task
.
getSubmitTime
()))
{
task
.
setSubmitDate
(
DateUtil
.
formatDateTime
(
new
Date
(
task
.
getSubmitTime
())));
}
if
(
ObjectUtil
.
isNotNull
(
task
.
getStartTime
()))
{
task
.
setStartDate
(
DateUtil
.
formatDateTime
(
new
Date
(
task
.
getStartTime
())));
}
Long
costTime
=
(
task
.
getFinishTime
()
-
task
.
getStartTime
())
/
1000
;
Long
costTime
=
(
task
.
getFinishTime
()
-
task
.
getStartTime
())
/
1000
;
task
.
setCostTime
(
costTime
);
task
.
setCostTime
(
costTime
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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