2023-07-31 07:34:36 -05:00
|
|
|
import { GeoIP } from '@server/helpers/geo-ip.js'
|
|
|
|
import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants.js'
|
|
|
|
import { AbstractScheduler } from './abstract-scheduler.js'
|
2022-03-24 07:36:47 -05:00
|
|
|
|
|
|
|
export class GeoIPUpdateScheduler extends AbstractScheduler {
|
|
|
|
|
|
|
|
private static instance: AbstractScheduler
|
|
|
|
|
2022-05-24 07:55:07 -05:00
|
|
|
protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.GEO_IP_UPDATE
|
2022-03-24 07:36:47 -05:00
|
|
|
|
|
|
|
private constructor () {
|
|
|
|
super()
|
|
|
|
}
|
|
|
|
|
|
|
|
protected internalExecute () {
|
2023-12-28 02:12:20 -06:00
|
|
|
return GeoIP.Instance.updateDatabases()
|
2022-03-24 07:36:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
static get Instance () {
|
|
|
|
return this.instance || (this.instance = new this())
|
|
|
|
}
|
|
|
|
}
|