mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
no message
This commit is contained in:
parent
69ec4966d5
commit
a032c6114f
@ -103,6 +103,10 @@ class WebSocketService implements WebSocketHandlerInterface
|
||||
case 'receipt':
|
||||
return;
|
||||
|
||||
// 握手信息
|
||||
case 'handshake':
|
||||
break;
|
||||
|
||||
// 访问状态
|
||||
case 'path':
|
||||
$row = WebSocket::whereFd($frame->fd)->first();
|
||||
|
||||
@ -167,7 +167,7 @@ services:
|
||||
|
||||
ai:
|
||||
container_name: "dootask-ai-${APP_ID}"
|
||||
image: "kuaifan/dootask-ai:0.2.0"
|
||||
image: "kuaifan/dootask-ai:0.2.2"
|
||||
environment:
|
||||
REDIS_HOST: "${REDIS_HOST}"
|
||||
REDIS_PORT: "${REDIS_PORT}"
|
||||
|
||||
@ -179,10 +179,19 @@ export default {
|
||||
$A.updateTimezone()
|
||||
|
||||
this.__windowTimer && clearTimeout(this.__windowTimer)
|
||||
this.__timeoutTimer && clearTimeout(this.__timeoutTimer)
|
||||
this.__windowTimer = setTimeout(async () => {
|
||||
try {
|
||||
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 {
|
||||
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
|
||||
}
|
||||
if (typeof callback === "function") {
|
||||
msgId = $A.randomString(16)
|
||||
msgId = type + '_' + $A.randomString(3)
|
||||
state.wsCall[msgId] = callback
|
||||
}
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user