-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Line 177 in a904eae
| err := service.UpdateVMStatusInRedis(ctx, c.rdb, req.UUID, normalizedStatus, time.Now().Unix()) |
<-- 해당 부분처럼 api 에서 redis 트랜잭션을 만든다거나
KWS_Control/structure/control_infra.go
Line 88 in a904eae
| tx, err := contextStructure.DB.Begin() |
<-- structure 라는 폴더에서 모든 db 트랜젝션을 하는 것 같은데
모델 분리/이름 변경등과, repositor 별로 묶으면 읽기 좀 더 쉬울것 같아요(ip 계산 로직도 다른 곳에 두는게 나을것 같네요)
또 평문 transaction 도 좋지만 Orm 도 한번 고려해보면 좋을 것 같아요.
둘다 괜찮지만 따로 이유가 있었다면 알려주세용.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels