File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 95
95
3 . /GetOutputVideo, 如果任务已经完成,输入 TaskId,返回已经完成的视频路径结果。
96
96
4 . /Stop, 如果任务执行时间过长,可以支持停止。
97
97
98
- 服务代码参考 [ video_cut_service.go] ( https://github.com/memory-overflow/light-task-scheduler/blob/dev/demo-video-cut /example/videocut_example/video_cut/video_cut_service.go ) 。
98
+ 服务代码参考 [ video_cut_service.go] ( https://github.com/memory-overflow/light-task-scheduler/blob/main /example/videocut_example/video_cut/video_cut_service.go ) 。
99
99
100
100
现在我们通过本任务调度框架实现一个对裁剪任务进行调度系统,可以控制任务并发数,和任务超时时间。并且按照队列依次调度。
101
101
@@ -110,13 +110,13 @@ type VideoCutTask struct {
110
110
```
111
111
112
112
#### 实现视频裁剪任务执行器
113
- 实现一个视频裁剪任务的执行器,执行器实际上就是调用视频裁剪微服务的 API 接口。执行器的实现参考[ video_cut_actuator.go] ( https://github.com/memory-overflow/light-task-scheduler/blob/dev/demo-video-cut /example/videocut_example/video_cut/video_cut_actuator.go ) , 这里对任务结果只是输出到 stdout 展示,不做后续更多处理了。
113
+ 实现一个视频裁剪任务的执行器,执行器实际上就是调用视频裁剪微服务的 API 接口。执行器的实现参考[ video_cut_actuator.go] ( https://github.com/memory-overflow/light-task-scheduler/blob/main /example/videocut_example/video_cut/video_cut_actuator.go ) , 这里对任务结果只是输出到 stdout 展示,不做后续更多处理了。
114
114
115
115
#### 实现视频裁剪任务容器
116
116
这里,我们简单的直接使用队列来作为任务容器,所以可以直接用框架预置的 queueContainer 作为任务容器,无需单独实现。
117
117
118
118
#### 实现调度
119
- 参考代码[ main.go] ( https://github.com/memory-overflow/light-task-scheduler/blob/dev/demo-video-cut /example/videocut_example/main.go ) ,` go run main.go xxx.mp4 ` 可以执行 demo(需要安装 ffmpeg 命令)。
119
+ 参考代码[ main.go] ( https://github.com/memory-overflow/light-task-scheduler/blob/main /example/videocut_example/main.go ) ,` go run main.go xxx.mp4 ` 可以执行 demo(需要安装 ffmpeg 命令)。
120
120
121
121
``` go
122
122
func main () {
@@ -166,9 +166,4 @@ func main() {
166
166
return
167
167
}
168
168
}
169
- <<<<<<< HEAD
170
169
```
171
- =======
172
-
173
- ```
174
- >>>>>>> 7a438e32d39d825a30aa89e269399dbb9922cc1f
You can’t perform that action at this time.
0 commit comments