aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/schedulers/geo-ip-update-scheduler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/schedulers/geo-ip-update-scheduler.ts')
-rw-r--r--server/lib/schedulers/geo-ip-update-scheduler.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/server/lib/schedulers/geo-ip-update-scheduler.ts b/server/lib/schedulers/geo-ip-update-scheduler.ts
new file mode 100644
index 000000000..9dda6d76c
--- /dev/null
+++ b/server/lib/schedulers/geo-ip-update-scheduler.ts
@@ -0,0 +1,22 @@
1import { GeoIP } from '@server/helpers/geo-ip'
2import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants'
3import { AbstractScheduler } from './abstract-scheduler'
4
5export class GeoIPUpdateScheduler extends AbstractScheduler {
6
7 private static instance: AbstractScheduler
8
9 protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.YOUTUBE_DL_UPDATE
10
11 private constructor () {
12 super()
13 }
14
15 protected internalExecute () {
16 return GeoIP.Instance.updateDatabase()
17 }
18
19 static get Instance () {
20 return this.instance || (this.instance = new this())
21 }
22}