File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -129,21 +129,39 @@ impl Instance {
129
129
pub fn get_state ( & self ) -> EpsilonState {
130
130
let status = self . pod . status . as_ref ( ) . unwrap ( ) ;
131
131
132
+ info ! ( "1" ) ;
133
+
132
134
let metadata = & self . pod . metadata ;
135
+
136
+ info ! ( "2" ) ;
137
+
133
138
let labels = metadata. labels . as_ref ( ) . unwrap ( ) ;
134
139
140
+ info ! ( "3" ) ;
141
+
135
142
let conditions = status. conditions . as_ref ( ) . unwrap ( ) ;
136
143
144
+ info ! ( "4" ) ;
145
+
137
146
let is_ready = conditions
138
147
. iter ( )
139
148
. any ( |condition| condition. type_ == "Ready" && condition. status == "True" )
140
149
&& status. phase . as_ref ( ) . unwrap ( ) == "Running" ;
141
150
151
+ info ! ( "5" ) ;
152
+
142
153
let label = & labels. get ( Label :: IN_GAME_LABEL ) ;
154
+
155
+ info ! ( "6" ) ;
156
+
143
157
let is_in_game = label. is_some ( ) && label. unwrap ( ) == "true" ;
144
158
159
+ info ! ( "7" ) ;
160
+
145
161
let is_stopping = metadata. deletion_timestamp . is_some ( ) || self . is_succeeded ( ) ;
146
162
163
+ info ! ( "8" ) ;
164
+
147
165
if is_ready && is_in_game {
148
166
EpsilonState :: InGame
149
167
} else if is_stopping {
You can’t perform that action at this time.
0 commit comments