From abd17b32568f823e87798d48d94325e4cf41fe0e Mon Sep 17 00:00:00 2001 From: moonleay Date: Thu, 18 Jan 2024 18:34:53 +0100 Subject: [PATCH] chore!: removed unused updater cronjobs Signed-off-by: moonleay --- ...atoon3ApiFestivalAndCoopUpdateScheduler.kt | 50 ------------------- ...Splatoon3ApiSplatnetGearUpdateScheduler.kt | 47 ----------------- 2 files changed, 97 deletions(-) delete mode 100644 src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiFestivalAndCoopUpdateScheduler.kt delete mode 100644 src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiSplatnetGearUpdateScheduler.kt diff --git a/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiFestivalAndCoopUpdateScheduler.kt b/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiFestivalAndCoopUpdateScheduler.kt deleted file mode 100644 index 07f4a4b..0000000 --- a/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiFestivalAndCoopUpdateScheduler.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * lilJudd - * Copyright (C) 2024 moonleay - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package net.moonleay.lilJudd.jobs - -import dev.inmo.krontab.KronScheduler -import kotlinx.coroutines.Job -import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3ApiCache -import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiDataType -import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiRequestType -import net.moonleay.lilJudd.jobs.component.CronjobType -import net.moonleay.lilJudd.jobs.component.ICronjob -import net.moonleay.lilJudd.util.Logger - -object Splatoon3ApiFestivalAndCoopUpdateScheduler : ICronjob { - override val jobName: String - get() = "Splatoon3ApiFestivalAndCoopUpdateScheduler" - override val jobIncoming: String - get() = "0 0 0 /1 * * 0o *" // once a day - override val jobType: CronjobType - get() = CronjobType.INFINITE - override val continueJob: Boolean - get() = true - override lateinit var cronjobJob: Job - override lateinit var scheduler: KronScheduler - - override suspend fun jobFunction() { - Logger.out("Running Splatoon3ApiFestivalUpdateScheduler.") - Splatoon3ApiCache.updateData(ApiDataType.SPLATFESTS, ApiRequestType.AUTOMATIC_CACHE_UPDATE) - Logger.out("Splatoon3ApiFestivalUpdateScheduler finished.") - Logger.out("Running Splatoon3ApiCoopUpdateScheduler.") - Splatoon3ApiCache.updateData(ApiDataType.COOP, ApiRequestType.AUTOMATIC_CACHE_UPDATE) - Logger.out("Splatoon3ApiCoopUpdateScheduler finished.") - } -} diff --git a/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiSplatnetGearUpdateScheduler.kt b/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiSplatnetGearUpdateScheduler.kt deleted file mode 100644 index 7bbc020..0000000 --- a/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiSplatnetGearUpdateScheduler.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * lilJudd - * Copyright (C) 2024 moonleay - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package net.moonleay.lilJudd.jobs - -import dev.inmo.krontab.KronScheduler -import kotlinx.coroutines.Job -import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3ApiCache -import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiDataType -import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiRequestType -import net.moonleay.lilJudd.jobs.component.CronjobType -import net.moonleay.lilJudd.jobs.component.ICronjob -import net.moonleay.lilJudd.util.Logger - -object Splatoon3ApiSplatnetGearUpdateScheduler : ICronjob { - override val jobName: String - get() = "Splatoon3ApiSplatnetGearUpdateScheduler" - override val jobIncoming: String - get() = "0 0 /6 * * * 0o *" //Every 6 hours - override val jobType: CronjobType - get() = CronjobType.INFINITE - override val continueJob: Boolean - get() = true - override lateinit var cronjobJob: Job - override lateinit var scheduler: KronScheduler - - override suspend fun jobFunction() { - Logger.out("Running Splatoon3ApiSplatnetGearUpdateScheduler.") - Splatoon3ApiCache.updateData(ApiDataType.SPLATNETGEAR, ApiRequestType.AUTOMATIC_CACHE_UPDATE) - Logger.out("Splatoon3ApiSplatnetGearUpdateScheduler finished.") - } -}