enhance: pizzaxでstreamingのuser storage updateイベントを監視して更新 (#8095)

* wip

* wip?

* ?

* streamingのuser storage updateイベントを監視して更新

* 必要な時以外はストレージを更新しない

* fix?

* wip

* fix

* fix
This commit is contained in:
tamaina
2021-12-29 22:13:09 +09:00
committed by GitHub
parent 99eb919f4e
commit e159f15600
31 changed files with 98 additions and 53 deletions

View File

@@ -101,6 +101,7 @@ const alpha = (hex, a) => {
return `rgba(${r}, ${g}, ${b}, ${a})`;
};
import * as os from '@/os';
import { stream } from '@/stream';
export default defineComponent({
components: {
@@ -119,7 +120,7 @@ export default defineComponent({
stats: null,
serverInfo: null,
connection: null,
queueConnection: markRaw(os.stream.useChannel('queueStats')),
queueConnection: markRaw(stream.useChannel('queueStats')),
memUsage: 0,
chartCpuMem: null,
chartNet: null,
@@ -150,7 +151,7 @@ export default defineComponent({
os.api('admin/server-info', {}).then(res => {
this.serverInfo = res;
this.connection = markRaw(os.stream.useChannel('serverStats'));
this.connection = markRaw(stream.useChannel('serverStats'));
this.connection.on('stats', this.onStats);
this.connection.on('statsLog', this.onStatsLog);
this.connection.send('requestLog', {