なんかもうめっちゃ変えた
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import Xev from 'xev';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import Channel from '../channel.js';
|
||||
|
||||
const ev = new Xev();
|
||||
|
||||
export default class extends Channel {
|
||||
class QueueStatsChannel extends Channel {
|
||||
public readonly chName = 'queueStats';
|
||||
public static shouldShare = true;
|
||||
public static requireCredential = false;
|
||||
@@ -40,3 +41,20 @@ export default class extends Channel {
|
||||
ev.removeListener('queueStats', this.onStats);
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class QueueStatsChannelService {
|
||||
public readonly shouldShare = QueueStatsChannel.shouldShare;
|
||||
public readonly requireCredential = QueueStatsChannel.requireCredential;
|
||||
|
||||
constructor(
|
||||
) {
|
||||
}
|
||||
|
||||
public create(id: string, connection: Channel['connection']): QueueStatsChannel {
|
||||
return new QueueStatsChannel(
|
||||
id,
|
||||
connection,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user