mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
no message
This commit is contained in:
parent
69ec4966d5
commit
a032c6114f
@ -103,6 +103,10 @@ class WebSocketService implements WebSocketHandlerInterface
|
|||||||
case 'receipt':
|
case 'receipt':
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// 握手信息
|
||||||
|
case 'handshake':
|
||||||
|
break;
|
||||||
|
|
||||||
// 访问状态
|
// 访问状态
|
||||||
case 'path':
|
case 'path':
|
||||||
$row = WebSocket::whereFd($frame->fd)->first();
|
$row = WebSocket::whereFd($frame->fd)->first();
|
||||||
|
|||||||
@ -167,7 +167,7 @@ services:
|
|||||||
|
|
||||||
ai:
|
ai:
|
||||||
container_name: "dootask-ai-${APP_ID}"
|
container_name: "dootask-ai-${APP_ID}"
|
||||||
image: "kuaifan/dootask-ai:0.2.0"
|
image: "kuaifan/dootask-ai:0.2.2"
|
||||||
environment:
|
environment:
|
||||||
REDIS_HOST: "${REDIS_HOST}"
|
REDIS_HOST: "${REDIS_HOST}"
|
||||||
REDIS_PORT: "${REDIS_PORT}"
|
REDIS_PORT: "${REDIS_PORT}"
|
||||||
|
|||||||
@ -179,10 +179,19 @@ export default {
|
|||||||
$A.updateTimezone()
|
$A.updateTimezone()
|
||||||
|
|
||||||
this.__windowTimer && clearTimeout(this.__windowTimer)
|
this.__windowTimer && clearTimeout(this.__windowTimer)
|
||||||
|
this.__timeoutTimer && clearTimeout(this.__timeoutTimer)
|
||||||
this.__windowTimer = setTimeout(async () => {
|
this.__windowTimer = setTimeout(async () => {
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch("call", {url: "users/socket/status"})
|
await this.$store.dispatch("call", {url: "users/socket/status"})
|
||||||
await this.$store.dispatch("websocketSend", {type: 'handshake'})
|
await new Promise((resolve, reject) => {
|
||||||
|
this.$store.dispatch("websocketSend", {
|
||||||
|
type: 'handshake',
|
||||||
|
callback: (_, ok) => {
|
||||||
|
ok ? resolve() : reject(new Error('Handshake failed'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.__timeoutTimer = setTimeout(() => reject(new Error('Handshake timeout')), 6000);
|
||||||
|
});
|
||||||
} catch {
|
} catch {
|
||||||
await this.$store.dispatch("websocketConnection")
|
await this.$store.dispatch("websocketConnection")
|
||||||
}
|
}
|
||||||
|
|||||||
2
resources/assets/js/store/actions.js
vendored
2
resources/assets/js/store/actions.js
vendored
@ -4030,7 +4030,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (typeof callback === "function") {
|
if (typeof callback === "function") {
|
||||||
msgId = $A.randomString(16)
|
msgId = type + '_' + $A.randomString(3)
|
||||||
state.wsCall[msgId] = callback
|
state.wsCall[msgId] = callback
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user