This commit is contained in:
syuilo
2021-05-27 17:15:08 +09:00
parent c92744c3d3
commit ae2267220b
23 changed files with 69 additions and 386 deletions

View File

@@ -90,7 +90,7 @@ export default defineComponent({
stats: null,
serverInfo: null,
connection: null,
queueConnection: os.stream.useSharedConnection('queueStats'),
queueConnection: os.stream.useChannel('queueStats'),
memUsage: 0,
chartCpuMem: null,
chartNet: null,
@@ -121,7 +121,7 @@ export default defineComponent({
os.api('admin/server-info', {}).then(res => {
this.serverInfo = res;
this.connection = os.stream.useSharedConnection('serverStats');
this.connection = os.stream.useChannel('serverStats');
this.connection.on('stats', this.onStats);
this.connection.on('statsLog', this.onStatsLog);
this.connection.send('requestLog', {

View File

@@ -35,7 +35,7 @@ export default defineComponent({
title: this.$ts.jobQueue,
icon: 'fas fa-clipboard-list',
},
connection: os.stream.useSharedConnection('queueStats'),
connection: os.stream.useChannel('queueStats'),
}
},

View File

@@ -63,7 +63,7 @@ export default defineComponent({
},
mounted() {
this.connection = os.stream.useSharedConnection('messagingIndex');
this.connection = os.stream.useChannel('messagingIndex');
this.connection.on('message', this.onMessage);
this.connection.on('read', this.onRead);

View File

@@ -141,7 +141,7 @@ const Component = defineComponent({
this.group = group;
}
this.connection = os.stream.connectToChannel('messaging', {
this.connection = os.stream.useChannel('messaging', {
otherparty: this.user ? this.user.id : undefined,
group: this.group ? this.group.id : undefined,
});

View File

@@ -61,7 +61,7 @@ export default defineComponent({
if (this.connection) {
this.connection.dispose();
}
this.connection = os.stream.connectToChannel('gamesReversiGame', {
this.connection = os.stream.useChannel('gamesReversiGame', {
gameId: this.game.id
});
this.connection.on('started', this.onStarted);

View File

@@ -92,7 +92,7 @@ export default defineComponent({
mounted() {
if (this.$i) {
this.connection = os.stream.useSharedConnection('gamesReversi');
this.connection = os.stream.useChannel('gamesReversi');
this.connection.on('invited', this.onInvited);