()
| 110 | ) |
| 111 | |
| 112 | func InitJobController() { |
| 113 | go connReconcileWorker() |
| 114 | go jobPruningWorker() |
| 115 | |
| 116 | rpcClient := wshclient.GetBareRpcClient() |
| 117 | rpcClient.EventListener.On(wps.Event_RouteUp, handleRouteUpEvent) |
| 118 | rpcClient.EventListener.On(wps.Event_RouteDown, handleRouteDownEvent) |
| 119 | rpcClient.EventListener.On(wps.Event_ConnChange, handleConnChangeEvent) |
| 120 | rpcClient.EventListener.On(wps.Event_BlockClose, handleBlockCloseEvent) |
| 121 | wshclient.EventSubCommand(rpcClient, wps.SubscriptionRequest{ |
| 122 | Event: wps.Event_RouteUp, |
| 123 | AllScopes: true, |
| 124 | }, nil) |
| 125 | wshclient.EventSubCommand(rpcClient, wps.SubscriptionRequest{ |
| 126 | Event: wps.Event_RouteDown, |
| 127 | AllScopes: true, |
| 128 | }, nil) |
| 129 | wshclient.EventSubCommand(rpcClient, wps.SubscriptionRequest{ |
| 130 | Event: wps.Event_ConnChange, |
| 131 | AllScopes: true, |
| 132 | }, nil) |
| 133 | wshclient.EventSubCommand(rpcClient, wps.SubscriptionRequest{ |
| 134 | Event: wps.Event_BlockClose, |
| 135 | AllScopes: true, |
| 136 | }, nil) |
| 137 | } |
| 138 | |
| 139 | func isJobManagerRunning(job *waveobj.Job) bool { |
| 140 | return job.JobManagerStatus == JobManagerStatus_Running |
no test coverage detected