Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve automations interface #1709

Merged
merged 1 commit into from
Oct 16, 2024
Merged

improve automations interface #1709

merged 1 commit into from
Oct 16, 2024

Commits on Oct 16, 2024

  1. automations: refine interface with separate Outcome & Action

    A gap of the previous interface is that task polls will often want to
    make databases changes, and those changes should commit in the same
    transaction that updates the `internal.tasks` table with messages and
    state.
    
    Introduce an Outcome trait which is applied to Postgres transaction it's
    given, an to which its returned Action is also applied.
    
    This lets the Executor implement an optimistic concurrency workflow and
    further lets it defer deciding what its polling Action will be until
    after it verifies its optimistic lock.
    jgraettinger committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    233748c View commit details
    Browse the repository at this point in the history