File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,8 @@ func (c *Base) CreateClone(cloneRequest *types.CloneCreateRequest) (*models.Clon
181
181
AvailableDB : cloneRequest .DB .DBName ,
182
182
}
183
183
184
+ c .incrementCloneNumber (clone .Snapshot .ID )
185
+
184
186
go func () {
185
187
session , err := c .provision .StartSession (clone .Snapshot .ID , ephemeralUser , cloneRequest .ExtraConf )
186
188
if err != nil {
@@ -216,7 +218,6 @@ func (c *Base) fillCloneSession(cloneID string, session *resources.Session) {
216
218
217
219
w .Session = session
218
220
w .TimeStartedAt = time .Now ()
219
- c .incrementCloneNumber (w .Clone .Snapshot .ID )
220
221
221
222
clone := w .Clone
222
223
clone .Status = models.Status {
@@ -621,8 +622,11 @@ func (c *Base) isIdleClone(wrapper *CloneWrapper) (bool, error) {
621
622
622
623
session := wrapper .Session
623
624
624
- // TODO(akartasov): Remove wrappers without session.
625
625
if session == nil {
626
+ if wrapper .Clone .Status .Code == models .StatusFatal {
627
+ return true , nil
628
+ }
629
+
626
630
return false , errors .New ("failed to get clone session" )
627
631
}
628
632
You can’t perform that action at this time.
0 commit comments