@@ -42,7 +42,7 @@ public async Task<string> RegisterAsync(ServiceInfo serviceInfo)
4242 if ( oldEntity != null )
4343 {
4444 oldEntity . RegisterTime = DateTime . Now ;
45- oldEntity . Alive = ServiceAlive . Online ;
45+ oldEntity . Status = ServiceStatus . Healthy ;
4646 oldEntity . LastHeartBeat = DateTime . Now ;
4747 oldEntity . ServiceName = serviceInfo . ServiceName ;
4848 oldEntity . Ip = serviceInfo . Ip ;
@@ -65,7 +65,7 @@ public async Task<string> RegisterAsync(ServiceInfo serviceInfo)
6565
6666 serviceInfo . RegisterTime = DateTime . Now ;
6767 serviceInfo . LastHeartBeat = DateTime . Now ;
68- serviceInfo . Alive = ServiceAlive . Online ;
68+ serviceInfo . Status = ServiceStatus . Healthy ;
6969 serviceInfo . Id = Guid . NewGuid ( ) . ToString ( "n" ) ;
7070
7171 _dbContext . ServiceInfo . Add ( serviceInfo ) ;
@@ -151,14 +151,14 @@ public async Task<bool> ReceiveHeartbeatAsync(string serviceUniqueId)
151151 }
152152 else
153153 {
154- var oldStatus = entity . Alive ;
155- entity . Alive = ServiceAlive . Online ;
154+ var oldStatus = entity . Status ;
155+ entity . Status = ServiceStatus . Healthy ;
156156 entity . LastHeartBeat = DateTime . Now ;
157157 await _dbContext . UpdateAsync ( entity ) ;
158158
159159 await _dbContext . SaveChangesAsync ( ) ;
160160
161- if ( oldStatus != ServiceAlive . Online )
161+ if ( oldStatus != ServiceStatus . Healthy )
162162 {
163163 _serviceInfoService . ClearCache ( ) ;
164164 dynamic param = new ExpandoObject ( ) ;
0 commit comments