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

Add queues and *_later #2

Open
zachdaniel opened this issue Jun 6, 2023 · 1 comment
Open

Add queues and *_later #2

zachdaniel opened this issue Jun 6, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@zachdaniel
Copy link
Contributor

In discussing ways we can integrate oban with Ash, we've found that the ability to trigger actions to run "later" (start an oban job that will run a given action) would be very useful.

The way this would work is via configured queues for given actions:

    queues do
      queue :some_queue do
        actions [:action_1, :action_2]
        ...
      end
    end

and then you could use AshOban.send_later(Api, Resource, :action)

and some builtin changes could also be used. Perhaps an AshOban api extension to add create_later to the api for Api.create_later() (as well as the other action types)

      change create_later(AnalyticsEvent, :create, fn changeset, result -> 
        %{action: :input}
      end)
@zachdaniel zachdaniel added the enhancement New feature or request label Jun 6, 2023
@zachdaniel zachdaniel changed the title queues and *_later Add queues and *_later Jun 6, 2023
@rellen
Copy link
Contributor

rellen commented Aug 10, 2023

I have a PR that may be vaguely related to the *_later aspect of this
#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants