Skip to content

Commit

Permalink
Increase the content deadline to 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
AchoArnold committed Dec 8, 2023
1 parent dae1015 commit fb70993
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions api/pkg/di/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ func (container *Container) DedicatedDB() (db *gorm.DB) {
container.logger.Fatal(stacktrace.Propagate(err, "cannot use GORM tracing plugin"))
}

container.logger.Debug(fmt.Sprintf("Running migrations for yugabyte [%T]", db))
//if err = db.AutoMigrate(&entities.Heartbeat{}); err != nil {
// container.logger.Fatal(stacktrace.Propagate(err, fmt.Sprintf("cannot migrate %T", &entities.Heartbeat{})))
//}
//
//if err = db.AutoMigrate(&entities.HeartbeatMonitor{}); err != nil {
// container.logger.Fatal(stacktrace.Propagate(err, fmt.Sprintf("cannot migrate %T", &entities.HeartbeatMonitor{})))
//}
container.logger.Debug(fmt.Sprintf("Running migrations for dedicated [%T]", db))
if err = db.AutoMigrate(&entities.Heartbeat{}); err != nil {
container.logger.Fatal(stacktrace.Propagate(err, fmt.Sprintf("cannot migrate %T", &entities.Heartbeat{})))
}

if err = db.AutoMigrate(&entities.HeartbeatMonitor{}); err != nil {
container.logger.Fatal(stacktrace.Propagate(err, fmt.Sprintf("cannot migrate %T", &entities.HeartbeatMonitor{})))
}

container.dedicatedDB = db
return container.dedicatedDB
Expand Down
2 changes: 1 addition & 1 deletion api/pkg/repositories/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ const (
// ErrCodeNotFound is thrown when an entity does not exist in storage
ErrCodeNotFound = stacktrace.ErrorCode(1000)

dbOperationDuration = 1 * time.Second
dbOperationDuration = 5 * time.Second
)

0 comments on commit fb70993

Please sign in to comment.