refactor: merge retry target type into http (max_retries=0 = fire-and-forget)
All checks were successful
check / check (push) Successful in 1m46s
All checks were successful
check / check (push) Successful in 1m46s
This commit is contained in:
@@ -92,6 +92,16 @@ func (d *Database) migrate() error {
|
||||
}
|
||||
d.log.Info("database migrations completed")
|
||||
|
||||
// Data migration: merge "retry" target type into "http".
|
||||
// Previously there were two separate HTTP-based target types: "http"
|
||||
// (fire-and-forget) and "retry" (with retries). Now "http" handles
|
||||
// both: max_retries=0 means fire-and-forget, max_retries>0 enables
|
||||
// retries with exponential backoff and circuit breaker.
|
||||
if err := d.db.Exec("UPDATE targets SET type = 'http' WHERE type = 'retry'").Error; err != nil {
|
||||
d.log.Error("failed to migrate retry targets to http", "error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
// Check if admin user exists
|
||||
var userCount int64
|
||||
if err := d.db.Model(&User{}).Count(&userCount).Error; err != nil {
|
||||
|
||||
Reference in New Issue
Block a user