Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor: add prune script
  • Loading branch information
moonrailgun committed Nov 23, 2024
commit 1b5b2141dd6143a263fdff89b25fb6b2cbc693b8
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();
},
};