프로젝트

일반

사용자정보

개정판 46615333

ID46615333448dffe4a9ca997b14e1ee31b7208970
상위 7e2d682c
하위 b5005d4d, e1bbdef9

김태성이(가) 5년 이상 전에 추가함

ServiceMonitor.cs 수정

Change-Id: I533fbca718ba2bc3c3c4fcfbe686fef8469072dc

차이점 보기:

ConvertService/ServiceBase/Markus.Service.Monitor/ServiceMonitor.cs
25 25
        private const string StationProcessName = "Markus.Service.Station";
26 26
        private const string StationServiceName = "ServiceStation";
27 27

  
28
        ServiceController serviceController;
28
        ServiceController serviceStationController;
29 29
        StationService.StationServiceClient stationServiceClient;
30 30
        System.Timers.Timer timer;
31 31

  
......
46 46

  
47 47
        private void ServiceInitialize()
48 48
        {
49
            if (serviceController == null)
49
            if (serviceStationController == null)
50 50
            {
51
                serviceController = new ServiceController(StationServiceName);
51
                serviceStationController = new ServiceController(StationServiceName);
52 52
            }
53 53
        }
54 54

  
......
85 85

  
86 86
            try
87 87
            {
88

  
89
                if (serviceController == null)
88
                #region 서비스 체크 
89
                
90
                if (serviceStationController == null)
90 91
                {
91
                    serviceController = null;
92
                    serviceStationController = null;
92 93
                    ServiceInitialize();
93 94
                }
94 95
                else
95 96
                {
96
                    serviceController.Refresh();
97
                    System.Diagnostics.Debug.WriteLine(" serviceController.Status : " + serviceController.Status);
97
                    serviceStationController.Refresh();
98
                    System.Diagnostics.Debug.WriteLine(" serviceController.Status : " + serviceStationController.Status);
98 99

  
99
                    if (serviceController.Status != ServiceControllerStatus.Running && serviceController.Status != ServiceControllerStatus.StartPending)
100
                    if (serviceStationController.Status != ServiceControllerStatus.Running && serviceStationController.Status != ServiceControllerStatus.StartPending)
100 101
                    {
101
                        serviceController.Start();
102
                        serviceStationController.Start();
102 103
                    }
103 104
                    else
104 105
                    {
......
113 114
                            try
114 115
                            {
115 116
                                var result = stationServiceClient.AliveConvertList();
116
                                ConvertProcessCleanUp(stationServiceClient.AliveConvertList().ToList());
117
                                ConvertDBArrangement(stationServiceClient.AliveConvertList().ToList());
118

  
119

  
117 120
                            }
118 121
                            catch (Exception ex)
119 122
                            {
120
                                serviceController.Stop();
123
                                serviceStationController.Stop();
121 124
                            }
122 125

  
123 126
                        }
124 127
                    }
125 128
                }
129

  
130
                #endregion
126 131
            }
127 132
            catch (Exception ex)
128 133
            {
......
134 139
            }
135 140
        }
136 141

  
137
        private void ConvertProcessCleanUp(List<StationService.ConvertItem> AliveConvertList)
142
        private void GetServiceStaionSetting()
143
        {
144
           // serviceStationController.p
145
        }
146

  
147

  
148
        private void ConvertDBArrangement(List<StationService.ConvertItem> AliveConvertList)
138 149
        {
139
           // AliveConvertList
150
            int AliveCount = AliveConvertList.Count();
151

  
152
            if (AliveCount == 0)
153
            {
154

  
155
            }
156
            //else if(AliveCount < )
140 157
        }
141 158

  
142 159
        protected override void OnStop()

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)