summaryrefslogtreecommitdiff
path: root/src/server/api/stream/channels/queue-stats.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/stream/channels/queue-stats.ts')
-rw-r--r--src/server/api/stream/channels/queue-stats.ts41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/server/api/stream/channels/queue-stats.ts b/src/server/api/stream/channels/queue-stats.ts
deleted file mode 100644
index 0bda0cfcb9..0000000000
--- a/src/server/api/stream/channels/queue-stats.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import autobind from 'autobind-decorator';
-import Xev from 'xev';
-import Channel from '../channel';
-
-const ev = new Xev();
-
-export default class extends Channel {
- public readonly chName = 'queueStats';
- public static shouldShare = true;
- public static requireCredential = false;
-
- @autobind
- public async init(params: any) {
- ev.addListener('queueStats', this.onStats);
- }
-
- @autobind
- private onStats(stats: any) {
- this.send('stats', stats);
- }
-
- @autobind
- public onMessage(type: string, body: any) {
- switch (type) {
- case 'requestLog':
- ev.once(`queueStatsLog:${body.id}`, statsLog => {
- this.send('statsLog', statsLog);
- });
- ev.emit('requestQueueStatsLog', {
- id: body.id,
- length: body.length
- });
- break;
- }
- }
-
- @autobind
- public dispose() {
- ev.removeListener('queueStats', this.onStats);
- }
-}