Skip to content

Commit

Permalink
feat(sql): Support for migrating entity tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ajordens committed Jul 8, 2019
1 parent 0acbd56 commit 817d344
Showing 1 changed file with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,21 @@ class StorageServiceMigrator(
log.info("Migration complete in {}ms", migrationDurationMs)
}

// @Scheduled(fixedDelay = 90000)
// fun migrateEntityTags() {
// val migrationDurationMs = measureTimeMillis {
// migrate(ObjectType.ENTITY_TAGS)
// }
//
// log.info("Entity Tags Migration complete in {}ms", migrationDurationMs)
// }
@Scheduled(fixedDelay = 90000)
fun migrateEntityTags() {
if (!dynamicConfigService.isEnabled("spinnaker.migration.entityTags", false)) {
log.info("Entity Tags Migrator has been disabled")
return
}

val migrationDurationMs = measureTimeMillis {
try {
migrate(ObjectType.ENTITY_TAGS)
} catch (e: Exception) {
log.info("Entity Tags Migration failed", e)
}
}

log.info("Entity Tags Migration complete in {}ms", migrationDurationMs)
}
}

0 comments on commit 817d344

Please sign in to comment.