Skip to content

Commit

Permalink
Merge pull request #69 from tbs60/dev_tming_dist_link
Browse files Browse the repository at this point in the history
Dev tming dist link
  • Loading branch information
tming authored May 10, 2023
2 parents 0229f71 + 9c81122 commit cae699e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
38 changes: 22 additions & 16 deletions src/backend/booster/bk_dist/shadertool/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,28 @@ type UE4Action struct {

// ApplyParameters define parameters to apply resource
type ApplyParameters struct {
ProjectID string `json:"project_id"`
Scene string `json:"scene"`
ServerHost string `json:"server_host"`
BatchMode bool `json:"batch_mode"`
WorkerList []string `json:"specific_host_list"`
NeedApply bool `json:"need_apply"`
BuildID string `json:"build_id"`
ShaderToolIdleRunSeconds int `json:"shader_tool_idle_run_seconds"`
ControllerIdleRunSeconds int `json:"controller_idle_run_seconds" value:"120" usage:"controller remain time after there is no active work (seconds)"`
ControllerNoBatchWait bool `json:"controller_no_batch_wait" value:"false" usage:"if true, controller will unregister immediately when no more running task"`
LimitPerWorker int `json:"limit_per_worker"`
MaxLocalTotalJobs int `json:"max_Local_total_jobs"`
MaxLocalPreJobs int `json:"max_Local_pre_jobs"`
MaxLocalExeJobs int `json:"max_Local_exe_jobs"`
MaxLocalPostJobs int `json:"max_Local_post_jobs"`
Env map[string]string `json:"env"`
ProjectID string `json:"project_id"`
Scene string `json:"scene"`
ServerHost string `json:"server_host"`
BatchMode bool `json:"batch_mode"`
WorkerList []string `json:"specific_host_list"`
NeedApply bool `json:"need_apply"`
BuildID string `json:"build_id"`
ShaderToolIdleRunSeconds int `json:"shader_tool_idle_run_seconds"`
ControllerIdleRunSeconds int `json:"controller_idle_run_seconds" value:"120" usage:"controller remain time after there is no active work (seconds)"`
ControllerNoBatchWait bool `json:"controller_no_batch_wait" value:"false" usage:"if true, controller will unregister immediately when no more running task"`
ControllerSendCork bool `json:"controller_send_cork" value:"false" usage:"if true, controller will send file with cork"`
ControllerSendFileMemoryLimit int64 `json:"controller_send_file_memory" value:"4294967296" usage:"memory limit when send file with cork"`
ControllerNetErrorLimit int `json:"controller_net_error_limit" value:"5" usage:"judge net error if failed times over this"`
ControllerRemoteRetryTimes int `json:"controller_remote_retry_times" value:"0" usage:"default remote retry times"`
ControllerEnableLink bool `json:"controller_enable_link" value:"false" usage:"if true, controller will enable dist link"`
ControllerEnableLib bool `json:"controller_enable_lib" value:"false" usage:"if true, controller will enable dist lib"`
LimitPerWorker int `json:"limit_per_worker"`
MaxLocalTotalJobs int `json:"max_Local_total_jobs"`
MaxLocalPreJobs int `json:"max_Local_pre_jobs"`
MaxLocalExeJobs int `json:"max_Local_exe_jobs"`
MaxLocalPostJobs int `json:"max_Local_post_jobs"`
Env map[string]string `json:"env"`
}

// Actionresult define action result
Expand Down
6 changes: 6 additions & 0 deletions src/backend/booster/bk_dist/shadertool/pkg/shadertool.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ func (h *ShaderTool) launchController() error {
if h.controller == nil {
h.controllerconfig.RemainTime = h.settings.ControllerIdleRunSeconds
h.controllerconfig.NoWait = h.settings.ControllerNoBatchWait
h.controllerconfig.SendCork = h.settings.ControllerSendCork
h.controllerconfig.SendFileMemoryLimit = h.settings.ControllerSendFileMemoryLimit
h.controllerconfig.NetErrorLimit = h.settings.ControllerNetErrorLimit
h.controllerconfig.RemoteRetryTimes = h.settings.ControllerRemoteRetryTimes
h.controllerconfig.EnableLink = h.settings.ControllerEnableLink
h.controllerconfig.EnableLib = h.settings.ControllerEnableLib
h.controller = v1.NewSDK(h.controllerconfig)
}

Expand Down

0 comments on commit cae699e

Please sign in to comment.