@@ -83,7 +83,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
83
83
if exist != nil {
84
84
return nil , buserr .New (constant .ErrImageExist )
85
85
}
86
- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
86
+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDoNet :
87
87
if ! fileOp .Stat (create .CodeDir ) {
88
88
return nil , buserr .New (constant .ErrPathNotFound )
89
89
}
@@ -113,7 +113,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
113
113
}
114
114
115
115
appVersionDir := filepath .Join (app .GetAppResourcePath (), appDetail .Version )
116
- if ! fileOp .Stat (appVersionDir ) || appDetail . Update {
116
+ if ! fileOp .Stat (appVersionDir ) {
117
117
if err = downloadApp (app , appDetail , nil ); err != nil {
118
118
return nil , err
119
119
}
@@ -133,7 +133,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
133
133
if err = handlePHP (create , runtime , fileOp , appVersionDir ); err != nil {
134
134
return nil , err
135
135
}
136
- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
136
+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDoNet :
137
137
runtime .Port = create .Port
138
138
if err = handleNodeAndJava (create , runtime , fileOp , appVersionDir ); err != nil {
139
139
return nil , err
@@ -217,7 +217,7 @@ func (r *RuntimeService) Delete(runtimeDelete request.RuntimeDelete) error {
217
217
global .LOG .Errorf ("delete image id [%s] error %v" , imageID , err )
218
218
}
219
219
}
220
- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
220
+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDoNet :
221
221
if out , err := compose .Down (runtime .GetComposePath ()); err != nil && ! runtimeDelete .ForceDelete {
222
222
if out != "" {
223
223
return errors .New (out )
@@ -300,7 +300,7 @@ func (r *RuntimeService) Get(id uint) (*response.RuntimeDTO, error) {
300
300
}
301
301
}
302
302
res .AppParams = appParams
303
- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
303
+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDoNet :
304
304
res .Params = make (map [string ]interface {})
305
305
envs , err := gotenv .Unmarshal (runtime .Env )
306
306
if err != nil {
@@ -361,7 +361,7 @@ func (r *RuntimeService) Update(req request.RuntimeUpdate) error {
361
361
if exist != nil {
362
362
return buserr .New (constant .ErrImageExist )
363
363
}
364
- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
364
+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDoNet :
365
365
if runtime .Port != req .Port {
366
366
if err = checkPortExist (req .Port ); err != nil {
367
367
return err
@@ -441,7 +441,7 @@ func (r *RuntimeService) Update(req request.RuntimeUpdate) error {
441
441
return err
442
442
}
443
443
go buildRuntime (runtime , imageID , req .Rebuild )
444
- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
444
+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDoNet :
445
445
runtime .Version = req .Version
446
446
runtime .CodeDir = req .CodeDir
447
447
runtime .Port = req .Port
@@ -613,7 +613,7 @@ func (r *RuntimeService) SyncRuntimeStatus() error {
613
613
return err
614
614
}
615
615
for _ , runtime := range runtimes {
616
- if runtime .Type == constant .RuntimeNode || runtime . Type == constant . RuntimeJava || runtime . Type == constant . RuntimeGo {
616
+ if runtime .Type != constant .RuntimePHP {
617
617
_ = SyncRuntimeContainerStatus (& runtime )
618
618
}
619
619
}
0 commit comments