PruneEventForumsCommand
struct PruneEventForumsCommand : AsyncCommand
Prune Old Event Forums
In long-lived Swiftarr instances such as the Beta, we typically do not reset the database between sailings. As we accumulate years of events, the amount of forums starts to grow unweildy. The old events are marked as deleted and removed from the schedule, but the forums remain. This backend command is intended to be executed by an operator in one of these long-lived environments to soft-delete all forums that are linked to soft-deleted events.
The effects of this command can be reversed by importing the deleted schedule again which will restore the events and their associated forums (thanks, soft-delete).
-
Declaration
Swift
struct Signature : CommandSignature
-
Declaration
Swift
var help: String { get }
-
run(using:
Asynchronoussignature: ) Declaration
Swift
func run(using context: CommandContext, signature: Signature) async throws
-
findEvents(on:
Asynchronous) Declaration
Swift
private func findEvents(on app: Application) async throws
-
updateCategoryCounts(on:
Asynchronous) Declaration
Swift
private func updateCategoryCounts(on app: Application) async throws