Skip to content

Commit

Permalink
Update task types
Browse files Browse the repository at this point in the history
  • Loading branch information
mbryzek committed Jun 10, 2024
1 parent 9477a20 commit 67b5222
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions api/app/actors/ScheduleTasksActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ class ScheduleTasksActor @Inject()(
import TaskType._
scheduleOnce(ScheduleMigrateVersions)
Seq(
schedule(CleanupDeletions, FiniteDuration(1, HOURS)),
schedule(ScheduleSyncGeneratorServices, FiniteDuration(1, HOURS)),
schedule(CheckInvariants, FiniteDuration(1, HOURS)),
schedule(PurgeOldDeleted, FiniteDuration(1, HOURS))(FiniteDuration(5, SECONDS)),
schedule(PurgeDeleted, FiniteDuration(1, HOURS))(FiniteDuration(5, SECONDS)),
)
}

Expand Down
2 changes: 1 addition & 1 deletion api/app/processor/PurgeDeletedProcessor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PurgeDeletedProcessor @Inject()(
args: TaskProcessorArgs,
db: Database,
usersDao: UsersDao,
) extends TaskProcessor(args, TaskType.PurgeOldDeleted) {
) extends TaskProcessor(args, TaskType.PurgeDeleted) {

override def processRecord(id: String): ValidatedNec[String, Unit] = {
deleteAll(Tables.versions) { row =>
Expand Down
2 changes: 1 addition & 1 deletion api/app/processor/TaskActorCompanion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TaskActorCompanion @Inject() (
ScheduleSyncGeneratorServices -> scheduleSyncGeneratorServices,
SyncGeneratorService -> syncGeneratorService,
Email -> email,
PurgeOldDeleted -> purgeDeleted,
PurgeDeleted -> purgeDeleted,
)
}

Expand Down
9 changes: 4 additions & 5 deletions generated/app/ApicollectiveApibuilderTaskV0Client.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Generated by API Builder - https://www.apibuilder.io
* Service version: 0.16.28
* Service version: 0.16.36
* apibuilder app.apibuilder.io/apicollective/apibuilder-task/latest/play_2_8_client
*/
package io.apibuilder.task.v0.models {
Expand Down Expand Up @@ -62,10 +62,9 @@ package io.apibuilder.task.v0.models {
case object Email extends TaskType { override def toString = "email" }
case object CheckInvariants extends TaskType { override def toString = "check_invariants" }
case object IndexApplication extends TaskType { override def toString = "index_application" }
case object CleanupDeletions extends TaskType { override def toString = "cleanup_deletions" }
case object ScheduleMigrateVersions extends TaskType { override def toString = "schedule_migrate_versions" }
case object MigrateVersion extends TaskType { override def toString = "migrate_version" }
case object PurgeOldDeleted extends TaskType { override def toString = "purge_old_deleted" }
case object PurgeDeleted extends TaskType { override def toString = "purge_deleted" }
case object ScheduleSyncGeneratorServices extends TaskType {
override def toString = "schedule_sync_generator_services"
}
Expand All @@ -88,7 +87,7 @@ package io.apibuilder.task.v0.models {
* lower case to avoid collisions with the camel cased values
* above.
*/
val all: scala.List[TaskType] = scala.List(Email, CheckInvariants, IndexApplication, CleanupDeletions, ScheduleMigrateVersions, MigrateVersion, PurgeOldDeleted, ScheduleSyncGeneratorServices, SyncGeneratorService, DiffVersion, UserCreated)
val all: scala.List[TaskType] = scala.List(Email, CheckInvariants, IndexApplication, ScheduleMigrateVersions, MigrateVersion, PurgeDeleted, ScheduleSyncGeneratorServices, SyncGeneratorService, DiffVersion, UserCreated)

private[this]
val byName: Map[String, TaskType] = all.map(x => x.toString.toLowerCase -> x).toMap
Expand Down Expand Up @@ -468,7 +467,7 @@ package io.apibuilder.task.v0 {

val Namespace = "io.apibuilder.task.v0"
val UserAgent = "apibuilder app.apibuilder.io/apicollective/apibuilder-task/latest/play_2_8_client"
val Version = "0.16.28"
val Version = "0.16.36"
val VersionMajor = 0

}
Expand Down

0 comments on commit 67b5222

Please sign in to comment.