Sitelet https://github.com/DataFire/DataFire/issues/26
Skip to content

Feature: keeping state across action runs #26

Description

@rbren

We should have a way to maintain state each time an action is run. For instance, a task might crawl a different page of a result set each time it runs, keeping track of state.pageNumber.

It would be easy to keep a small amount of state in-memory, but if the process is restarted, we'll often want to pick up where we left off.

I think loadState and saveState should be optional, asynchronous functions that can be specified by the user. They can write to a local file, a remote database, an in-memory object, or whatever else. They should be able to be specified once for the project as a whole, and overridden for individual actions (maybe inside context?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions