diff --git a/modules/joex/src/main/scala/docspell/joex/JoexAppImpl.scala b/modules/joex/src/main/scala/docspell/joex/JoexAppImpl.scala index ebf57d444c..f2ad679e1d 100644 --- a/modules/joex/src/main/scala/docspell/joex/JoexAppImpl.scala +++ b/modules/joex/src/main/scala/docspell/joex/JoexAppImpl.scala @@ -71,11 +71,11 @@ final class JoexAppImpl[F[_]: Async]( private def scheduleBackgroundTasks: F[Unit] = HouseKeepingTask .periodicTask[F](cfg.houseKeeping.schedule) - .flatMap(t => uts.updateTask(UserTaskScope.system, t.summary, t)) *> + .flatMap(t => uts.updateOneTask(UserTaskScope.system, t.summary, t)) *> scheduleEmptyTrashTasks *> UpdateCheckTask .periodicTask(cfg.updateCheck) - .flatMap(t => uts.updateTask(UserTaskScope.system, t.summary, t)) *> + .flatMap(t => uts.updateOneTask(UserTaskScope.system, t.summary, t)) *> MigrationTask.job.flatMap(jobStore.insertIfNew) *> AllPreviewsTask .job(MakePreviewArgs.StoreMode.WhenMissing, None) diff --git a/modules/joex/src/main/scala/docspell/joex/updatecheck/UpdateCheckTask.scala b/modules/joex/src/main/scala/docspell/joex/updatecheck/UpdateCheckTask.scala index 57ccecaef3..e3fdae84dc 100644 --- a/modules/joex/src/main/scala/docspell/joex/updatecheck/UpdateCheckTask.scala +++ b/modules/joex/src/main/scala/docspell/joex/updatecheck/UpdateCheckTask.scala @@ -20,6 +20,7 @@ import emil._ object UpdateCheckTask { val taskName: Ident = Ident.unsafe("new-release-check") + val periodicId: Ident = Ident.unsafe("docspell-update-check") type Args = Unit @@ -28,7 +29,7 @@ object UpdateCheckTask { def periodicTask[F[_]: Sync](cfg: UpdateCheckConfig): F[UserTask[Unit]] = UserTask( - Ident.unsafe("docspell-update-check"), + periodicId, taskName, cfg.enabled, cfg.schedule,