geobase/src/modules/geonames/geonames.command.ts

17 lines
406 B
TypeScript

import { Injectable } from '@nestjs/common';
import { Command } from 'nestjs-command';
import { GeonamesService } from './geonames.service';
@Injectable()
export class GeonamesCommand {
constructor(private readonly service: GeonamesService) {}
@Command({
command: 'geonames:import',
describe: 'Import Geonames database',
})
async import() {
await this.service.runUpdateCycle();
}
}