feat(server): reap Free instances whose licence lapsed
The control plane owns deletion because it is the only service that knows what an instance is made of; mirroring that collection list into admin would drift, and a drift here deletes the wrong rows. Defaults OFF. Eligibility is three positive assertions — Free tier, an expiry that exists, and an expiry past the window — so a missing or stale field is never eligible. The instance document is deleted last, making an interrupted purge retryable rather than orphaning rows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -113,6 +113,8 @@ func main() {
|
||||
|
||||
monitorsched.Start(context.Background())
|
||||
|
||||
services.StartReaper(context.Background())
|
||||
|
||||
r := gin.New()
|
||||
r.Use(gin.Recovery())
|
||||
r.Use(gin.LoggerWithConfig(gin.LoggerConfig{SkipPaths: []string{"/api/console/tunnel"}}))
|
||||
|
||||
Reference in New Issue
Block a user