File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -89,30 +89,8 @@ def run(self):
89
89
'''
90
90
run thread
91
91
'''
92
- self .__load_states ()
93
- while self .__should_run :
94
- try :
95
- for line in self .__get_journal ():
96
- self .__status = True
97
- # exit on no actions
98
- if not self .__should_run :
99
- break
100
- # parse line
101
- if isinstance (line , bytes ):
102
- line = line .decode ('utf8' )
103
- data = json .loads (line )
104
- # check if it is unit related infomation
105
- if 'UNIT' not in data :
106
- continue
107
- # update internal storage
108
- with self .__lock :
109
- self .__states [
110
- data ['UNIT' ]] = self .__systemd .get_unit (data ['UNIT' ])
111
- self .__lst = datetime .datetime .utcnow ()
112
- except Exception :
113
- self .__logger .warning ('Exception recieved' , exc_info = True )
114
- self .__status = False
115
- time .sleep (60 )
92
+ for unit , state in self .run_iterate ():
93
+ pass
116
94
117
95
def run_iterate (self ):
118
96
'''
You can’t perform that action at this time.
0 commit comments