|
|
|
@ -405,6 +405,7 @@ export default { |
|
|
|
|
accountId: '', |
|
|
|
|
runCodeType: '', |
|
|
|
|
finishVscodeItem: 0, |
|
|
|
|
clientTopic: '', |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
components: { |
|
|
|
@ -1236,8 +1237,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
onConnected: function () { |
|
|
|
|
//订阅频道 |
|
|
|
|
const topic = '/amq/queue/pythonQueue_' + this.accountId; |
|
|
|
|
this.client.subscribe(topic, this.responseCallback, this.onFailed); |
|
|
|
|
this.clientTopic = '/amq/queue/pythonQueue_' + this.accountId; |
|
|
|
|
this.client.subscribe(this.clientTopic, this.responseCallback, this.onFailed); |
|
|
|
|
}, |
|
|
|
|
onFailed: function (frame) { |
|
|
|
|
console.log("MQ Failed: " + frame); |
|
|
|
@ -1256,7 +1257,7 @@ export default { |
|
|
|
|
newmain.$emit('runCode', data) |
|
|
|
|
} |
|
|
|
|
if (this.runCodeType !== 'vscodeRunCode') this.runCodeType = '' |
|
|
|
|
} else if (typeof data === 'string') { |
|
|
|
|
} else if (typeof data === 'string' && data !== 'ping') { |
|
|
|
|
newmain.$emit('setPid', data) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -1270,9 +1271,9 @@ export default { |
|
|
|
|
// 心跳检测 |
|
|
|
|
heartbeatDetection () { |
|
|
|
|
setInterval(async () => { |
|
|
|
|
this.client.send('ping') |
|
|
|
|
await this.$get(this.api.heartbeatDetectionRabbit) |
|
|
|
|
await this.$get(this.api.heartbeatDetection) |
|
|
|
|
}, 56 * 1000) |
|
|
|
|
}, 55 * 1000) |
|
|
|
|
}, |
|
|
|
|
// 获取用户详情 |
|
|
|
|
getUserDetail () { |
|
|
|
|