ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

geo-ip-update-scheduler.ts 581 B

12345678910111213141516171819202122
  1. import { GeoIP } from '@server/helpers/geo-ip.js'
  2. import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants.js'
  3. import { AbstractScheduler } from './abstract-scheduler.js'
  4. export class GeoIPUpdateScheduler extends AbstractScheduler {
  5. private static instance: AbstractScheduler
  6. protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.GEO_IP_UPDATE
  7. private constructor () {
  8. super()
  9. }
  10. protected internalExecute () {
  11. return GeoIP.Instance.updateDatabases()
  12. }
  13. static get Instance () {
  14. return this.instance || (this.instance = new this())
  15. }
  16. }