优化RPC逻辑

This commit is contained in:
marvzhang
2020-03-08 17:50:26 +08:00
parent 73b6f96b6a
commit 19a7c25d18
3 changed files with 70 additions and 69 deletions

View File

@@ -113,13 +113,6 @@ export default {
},
methods: {
async getData () {
// await Promise.all(this.nodeList.map(async n => {
// const res = await this.$request.get(`/nodes/${n._id}/langs`)
// res.data.data.forEach(l => {
// const key = n._id + '|' + l.executable_name
// this.$set(this.dataDict, key, l)
// })
// }))
for (let i = 0; i < this.nodeList.length; i++) {
const n = this.nodeList[i]
const res = await this.$request.get(`/nodes/${n._id}/langs`)
@@ -169,7 +162,7 @@ export default {
}
},
async created () {
await this.getData()
this.getData()
this.handle = setInterval(() => {
this.getData()