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