Skip to content

[FEATURE] Support transient flows #998

@georgeh0

Description

@georgeh0

CocoIndex treats transformation as persistent / keep-going tasks that keep maintaining and evolving the outcome on source data / flow change.

Sometimes users want the other way: treat data transformations as transient tasks (fire and forget).

Specifically:

  • Add a new argument transient to the @cocoindex.flow_def decorator, e.g.

    @cocoindex.flow_def(name="MyFlow", transient=True)
    def my_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoindex.DataScope):
      ...
  • Live update is not supported for a transient flow

  • In this mode, both setup and update are transient tasks (fire and forget) without keeping any states in CocoIndex's internal storage.


❤️ Contributors, please refer to 📙Contributing Guide.
Unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like I'm working on it or Can I work on this issue? to avoid duplicating work. Our Discord server is always open and friendly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions