Skip to content

Question: Record intermediate results of the task #823

@KirigiriSuzumiya

Description

@KirigiriSuzumiya

What should I do if I want to record the intermediate results of the task? e.g. {"progress":0.87},I find defination of task states in doc like this

// TaskState represents a state of a task
type TaskState struct {
  TaskUUID  string        `bson:"_id"`
  State     string        `bson:"state"`
  Results   []*TaskResult `bson:"results"`
  Error     string        `bson:"error"`
}

with a slice of result, then how can I return mutlipy result in one task? Or other way to record intermediate results?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions