Skip to content

Commit

Permalink
fix(status): status object sould inherit from io
Browse files Browse the repository at this point in the history
That way we can make use of all the helpful io resolution functions when translating from an
executor schema to queenbee
  • Loading branch information
AntoineDao committed Dec 5, 2020
1 parent 71297f8 commit 4162a30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion queenbee/workflow/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import List, Dict

from ..base.basemodel import BaseModel
from ..io.common import IOBase
from ..io.inputs.node import NodeInputs
from ..io.outputs.node import NodeOutputs

Expand All @@ -23,7 +24,7 @@ class StatusType(str, Enum):
Unknown = 'Unknown'


class BaseStatus(BaseModel):
class BaseStatus(IOBase):
"""Base Status model"""
type: constr(regex='^BaseStatus$') = 'BaseStatus'

Expand Down Expand Up @@ -126,3 +127,8 @@ class WorkflowStatus(BaseStatus):
)

nodes: Dict[str, NodeStatus] = {}

outputs: List[NodeOutputs] = Field(
...,
description='The outputs produced by this task'
)

0 comments on commit 4162a30

Please sign in to comment.