mirror of https://github.com/msgbyte/tailchat
				
				
				
			Merge 1b5b2141dd into 5a21d630e5
				
					
				
			
						commit
						756d30adc6
					
				@ -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