mirror of https://github.com/msgbyte/tailchat
refactor: add prune script
parent
677faa0b35
commit
1b5b2141dd
@ -0,0 +1,23 @@
|
||||
import { CommandModule } from 'yargs';
|
||||
import { TcBroker } from 'tailchat-server-sdk';
|
||||
import defaultBrokerConfig from 'tailchat-server-sdk/dist/runner/moleculer.config';
|
||||
import { config } from 'dotenv';
|
||||
|
||||
export const pruneCommand: CommandModule = {
|
||||
command: 'prune',
|
||||
describe: 'Remove outdate data',
|
||||
builder: undefined,
|
||||
async handler(args) {
|
||||
config();
|
||||
|
||||
// TODO: search all outdate data
|
||||
|
||||
// TODO: Call file service to remove them
|
||||
|
||||
// const broker = new TcBroker({
|
||||
// ...defaultBrokerConfig,
|
||||
// transporter: process.env.TRANSPORTER,
|
||||
// });
|
||||
// await broker.start();
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue