File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -337,16 +337,16 @@ def state(self, name):
337337 "deactivating" : "down" ,
338338 }
339339 try :
340- # NOTE (bacongobbler): this call to ._get_unit() also acts as a pre-emptive check to
340+ # NOTE (bacongobbler): this call to ._get_unit() acts as a pre-emptive check to
341341 # determine if the job no longer exists (will raise a RuntimeError on 404)
342- unit = self ._get_unit (name )
342+ self ._get_unit (name )
343343 state = self ._wait_for_container_state (name )
344344 activeState = state ['systemdActiveState' ]
345345 # FIXME (bacongobbler): when fleet loads a job, sometimes it'll automatically start and
346346 # stop the container, which in our case will return as 'failed', even though
347347 # the container is perfectly fine.
348348 if activeState == 'failed' :
349- if json . loads ( unit )[ 'currentState ' ] == 'loaded' :
349+ if state [ 'systemdLoadState ' ] == 'loaded' :
350350 return JobState .created
351351 return getattr (JobState , systemdActiveStateMap [activeState ])
352352 except KeyError :
You can’t perform that action at this time.
0 commit comments