Skip to content

Commit

Permalink
refactor: add prune script
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Nov 23, 2024
1 parent 677faa0 commit 1b5b214
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions apps/cli/src/commands/system/prune.ts
Original file line number Diff line number Diff line change
@@ -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();
},
};

0 comments on commit 1b5b214

Please sign in to comment.