Skip to content

Commit cb37df9

Browse files
committed
chore: clean comments and move log
Signed-off-by: chohee <[email protected]>
1 parent 6fa5d14 commit cb37df9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

manager/manager.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ func New(cfg *config.Config, d dfpath.Dfpath) (*Server, error) {
132132

133133
// Initialize encryption key
134134
if cfg.Encryption.Enable {
135-
logger.Infof("encryption enabled")
136135
if err := initializeEncryptionKey(cfg, db.DB); err != nil {
137136
return nil, err
138137
}
138+
logger.Infof("encryption enabled")
139139
} else {
140140
logger.Infof("encryption disabled")
141141
}
@@ -270,10 +270,6 @@ func registerGCTasks(gc pkggc.GC, db *gorm.DB) error {
270270

271271
// initializeEncryptionKey
272272
func initializeEncryptionKey(cfg *config.Config, db *gorm.DB) error {
273-
// db.Delete(&models.EncryptionKey{}, "1 = 1")
274-
275-
// TODO: manually use cache or gorm auto cache?
276-
// TODO: avoid printing key
277273
var existingKey models.EncryptionKey
278274
hasDBKey := false
279275
if err := db.First(&existingKey).Error; err == nil {

0 commit comments

Comments
 (0)