@@ -26,19 +26,16 @@ export class ACSOrchestrator {
2626
2727 public static async handleCoreStatusReport ( deviceID : number , statusReport : CoreStatusReport ) {
2828 try {
29- console . log ( "handle: " , statusReport )
3029 const core = await CoreRepo . getCoreByDeviceID ( deviceID ) ;
3130 if ( core === undefined ) {
3231 console . warn ( "status report from non-core" , deviceID )
3332 return ;
3433 }
35- console . log ( core )
3634
3735 await core . statusUpdate ( statusReport . currentCardTag ) ;
3836 const timesToSend = [ ] ;
3937 let shouldUpdateTimes = false
4038
41- console . log ( "channels" , statusReport . channels )
4239 for ( let i = 0 ; i < statusReport . channels . length ; i ++ ) {
4340 const channel = statusReport . channels [ i ] ;
4441 await core . updateControllerState ( channel . channelID , channel . state ) ;
@@ -47,7 +44,6 @@ export class ACSOrchestrator {
4744 if ( inst == undefined ) {
4845 continue ;
4946 }
50- console . log ( "inst" , inst )
5147
5248
5349 if ( inst . hobbsTime > channel . hobbsTime ) {
@@ -56,20 +52,17 @@ export class ACSOrchestrator {
5652 DeviceLogRepo . createDeviceLog ( deviceID , DeviceLogSeverity . MEDIUM , { msg : "hobbs-time-mismatch" , reported : channel . hobbsTime , stored : inst . hobbsTime } )
5753 shouldUpdateTimes = true
5854 } else {
59- const updated = await updateInstanceHobbsTime ( inst . id , channel . hobbsTime )
60- console . log ( "update" , updated )
55+ await updateInstanceHobbsTime ( inst . id , channel . hobbsTime )
6156 }
6257 }
6358 if ( shouldUpdateTimes ) {
64- console . log ( "hobbs tme mismatch: " , timesToSend )
6559 ACSOrchestrator . getDeviceController ( deviceID ) ?. sendCoreCommand ( core , {
6660 hobbsTime : timesToSend
6761 } )
6862
6963 }
7064
7165 } catch ( e ) {
72- console . warn ( e )
7366 await DeviceLogRepo . createDeviceLog ( deviceID , DeviceLogSeverity . MEDIUM , { type : "core-status-error" , error : e } ) ;
7467 }
7568 }
@@ -218,7 +211,6 @@ export class ACSOrchestrator {
218211
219212 const core = await CoreRepo . getCoreByDeviceID ( deviceID ) ;
220213 if ( core === undefined ) { return ; }
221- console . log ( "request" , infoRequest . fields , core )
222214 const response : ServerInfoResponse = {
223215 time : infoRequest . fields . includes ( CoreInfoOptions . TIME )
224216 ? ( new Date ) . getTime ( ) : undefined ,
@@ -237,11 +229,9 @@ export class ACSOrchestrator {
237229
238230 hobbsTime : infoRequest . fields . includes ( CoreInfoOptions . HOBBS_TIME ) ? await getHobbsTimes ( core ) : undefined
239231 }
240- console . log ( response )
241232
242233 ACSOrchestrator . getDeviceController ( core . deviceID ) ?. sendCoreInfoResponse ( core , response ) ;
243234 } catch ( e ) {
244- console . error ( e )
245235 await DeviceLogRepo . createDeviceLog ( deviceID , DeviceLogSeverity . MEDIUM , { type : "core-info-request-error" , error : e } ) ;
246236 }
247237 }
0 commit comments