Allow authoring task type & assign a default priority
This commit is contained in:
parent
edda8f21cf
commit
a4247f7a35
@ -53,6 +53,8 @@ type JobMetadata map[string]string
|
||||
|
||||
type AuthoredTask struct {
|
||||
Name string
|
||||
Type string
|
||||
Priority int
|
||||
Commands []AuthoredCommand
|
||||
|
||||
// Dependencies are tasks that need to be completed before this one can run.
|
||||
@ -64,9 +66,11 @@ type AuthoredCommand struct {
|
||||
Parameters map[string]string
|
||||
}
|
||||
|
||||
func (a *Author) Task(name string) (*AuthoredTask, error) {
|
||||
func (a *Author) Task(name string, taskType string) (*AuthoredTask, error) {
|
||||
at := AuthoredTask{
|
||||
name,
|
||||
taskType,
|
||||
50, // TODO: handle default priority somehow.
|
||||
make([]AuthoredCommand, 0),
|
||||
make([]*AuthoredTask, 0),
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ function authorRenderTasks(settings, renderDir, renderOutput) {
|
||||
let renderTasks = [];
|
||||
let chunks = frameChunker(settings.frames, settings.chunk_size);
|
||||
for (let chunk of chunks) {
|
||||
const task = author.Task(`render-${chunk}`);
|
||||
const task = author.Task(`render-${chunk}`, "blender");
|
||||
const command = author.Command("blender-render", {
|
||||
cmd: settings.blender_cmd,
|
||||
filepath: settings.filepath,
|
||||
|
Loading…
x
Reference in New Issue
Block a user