Skip to content

What do background and asynchronous really mean? #28

@joshco

Description

@joshco

I've been experimenting with this gem (very cool!) and can't wrap my head around what background and asynchronous are meant to be used for on Operations.

Background
When background is true, ActiveJob performs the task with a background job. Otherwise it is performed "now", synchronously.

Asynchronous
I don't understand what this does and I can't tell the difference from a workflow perspective.

What I'm looking for
What I was hoping for is a way to configure a workflow, so that if a user attempts to perform an Operation in a way that will not succeed because of dependencies and conditions, that the attempt to complete the operation (say the gem's complete method) would fail. At this point I'd just return the user an error message recommending next steps.

I'd like to avoid having to duplicate these checks both in validations (activerecord) and in the workflow process. Also, the complexity of the dependency relationships is a big reason why I'm looking at rails_workflow.

Could you enlighten us?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions