Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
love_飞影
Neos
Commits
6ef9a17f
Commit
6ef9a17f
authored
Jun 04, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/ai' into 'main'
fix blocking in ai first See merge request
mycard/Neos!213
parents
ec1837e9
d21d71cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
neos.config.json
neos.config.json
+1
-1
neos.config.prod.json
neos.config.prod.json
+1
-1
src/infra/stream.ts
src/infra/stream.ts
+3
-3
No files found.
neos.config.json
View file @
6ef9a17f
...
...
@@ -11,7 +11,7 @@
"cardsDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/cards.cdb"
,
"stringsUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/strings.conf"
,
"chainALL"
:
false
,
"streamInterval"
:
20
0
,
"streamInterval"
:
20
,
"ui"
:{
"hint"
:{
"waitingDuration"
:
1.5
,
...
...
neos.config.prod.json
View file @
6ef9a17f
...
...
@@ -11,7 +11,7 @@
"cardsDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/cards.cdb"
,
"stringsUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/strings.conf"
,
"chainALL"
:
false
,
"streamInterval"
:
20
0
,
"streamInterval"
:
20
,
"ui"
:{
"hint"
:{
"waitingDuration"
:
1.5
,
...
...
src/infra/stream.ts
View file @
6ef9a17f
...
...
@@ -53,14 +53,14 @@ export class WebSocketStream {
return
;
}
else
{
// websocket not closed, wait some time, and then handle next message from server
await
sleep
(
useConfig
().
streamInterval
);
// websocket not closed, handle next message from server
await
reader
.
read
().
then
(
process
);
}
}
if
(
value
)
{
// wait some time, and then handle message from server
await
sleep
(
useConfig
().
streamInterval
);
await
onMessage
(
value
);
}
else
{
console
.
warn
(
"
value from ReadableStream is undefined!
"
);
...
...
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