enhance: pizzaxでstreamingのuser storage updateイベントを監視して更新 (#8095)
* wip * wip? * ? * streamingのuser storage updateイベントを監視して更新 * 必要な時以外はストレージを更新しない * fix? * wip * fix * fix
This commit is contained in:
@ -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', {
|
||||
|
@ -81,6 +81,7 @@ import number from '@/filters/number';
|
||||
import MkInstanceInfo from './instance.vue';
|
||||
import XMetrics from './metrics.vue';
|
||||
import * as os from '@/os';
|
||||
import { stream } from '@/stream';
|
||||
import * as symbols from '@/symbols';
|
||||
|
||||
export default defineComponent({
|
||||
@ -113,7 +114,7 @@ export default defineComponent({
|
||||
notesComparedToThePrevDay: null,
|
||||
fetchJobs: () => os.api('admin/queue/deliver-delayed', {}),
|
||||
fetchModLogs: () => os.api('admin/show-moderation-logs', {}),
|
||||
queueStatsConnection: markRaw(os.stream.useChannel('queueStats')),
|
||||
queueStatsConnection: markRaw(stream.useChannel('queueStats')),
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -17,6 +17,7 @@ import XQueue from './queue.chart.vue';
|
||||
import FormBase from '@/components/debobigego/base.vue';
|
||||
import FormButton from '@/components/debobigego/button.vue';
|
||||
import * as os from '@/os';
|
||||
import { stream } from '@/stream';
|
||||
import * as symbols from '@/symbols';
|
||||
|
||||
export default defineComponent({
|
||||
@ -36,7 +37,7 @@ export default defineComponent({
|
||||
icon: 'fas fa-clipboard-list',
|
||||
bg: 'var(--bg)',
|
||||
},
|
||||
connection: markRaw(os.stream.useChannel('queueStats')),
|
||||
connection: markRaw(stream.useChannel('queueStats')),
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user