Skip to content

Commit

Permalink
feat: add seeder for initial package stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-R44 committed Jan 2, 2024
1 parent d8bf5b0 commit ec68f52
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions database/seeders/package_stat_seeder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import app from '@adonisjs/core/services/app'
import logger from '@adonisjs/core/services/logger'
import { BaseSeeder } from '@adonisjs/lucid/seeders'

import { PackagesDataRefresher } from '#services/packages_data_refresher'

export default class extends BaseSeeder {
async run() {
logger.info('Refreshing packages data ...')

const refresher = await app.container.make(PackagesDataRefresher)
await refresher.refresh()

logger.info('Packages data refreshed')
}
}

0 comments on commit ec68f52

Please sign in to comment.