jina.jaml.parsers.executor.legacy module

class jina.jaml.parsers.executor.legacy.LegacyParser[source]

Bases: jina.jaml.parsers.base.VersionedYAMLParser

Legacy parser for executor.

  • version = ‘legacy’

    the version number this parser designed for

  • parse(cls, data)[source]

    • Parameters

      • cls (Type[BaseExecutor]) – target class type to parse into, must be a JAMLCompatible type

      • data (Dict) – flow yaml file loaded as python dict

      Return type

      BaseExecutor

      Returns

      the Flow YAML parser given the syntax version number

  • static is_tail_or_head(data)[source]

    Based on name, compute if this is a tail/head Pod or a main Pod

    • Parameters

      data (Dict) – the data for the parser

      Return type

      bool

      Returns

      True if it is tail/head, False otherwise

  • dump(data)[source]

    • Parameters

      data (BaseExecutor) – versioned executor object

      Return type

      Dict

      Returns

      the dictionary given a versioned flow object