mcoll
AEAsh Elixir
•Created by mcoll on 5/21/2025 in #support
AshOban job failures
I have a job that runs using AshOban, which I find a very nice way of doing things tbh, as most things you've done so far!
However it seems to me that the only way to handle failures is to give it an action to run. For example setting the state to failed, however I'd like to be able to see the failure in Oban apart from setting the Resource as failed. I have scoured the documentation but I don't see a way of having the Oban job fail on failure. Am I missing something? Was there a specific reason this is like this?
28 replies
AEAsh Elixir
•Created by mcoll on 5/19/2025 in #support
Ash.Type.Tuple Enumerable not implemented
I have an attribute of type
:tuple
defined like this:
When I create an instance of this model
I get this error
Is this expected? Am I doing something wrong?107 replies
AEAsh Elixir
•Created by mcoll on 5/16/2025 in #support
Complex Custom Actions
How do you usually model complex operations over a model?
I have a model that needs to do some processing over their inputs, it handles everything related to subtitles, and after creation it goes over several stages of analysis of the context and such and I'm struggling to fit it inside of the Ash framework.
I was thinking to model it in two ways:
* Have an Oban job that contains that logic and operates over a
:update
or :analyzed
action.
* The problem in this case is that I cannot use AshOban to handle the scheduling, I'd need to do it manually
* Implement a manual action using Ash.Resource.ManualUpdate
, but in that case I'm a bit unsure how to handle everything, what are the best practices around ManualUpdate
and what am I giving up in exchange. I still have a bit of trouble reasoning about that.
* In that case do I need to deal with ecto directly? Or should I use other more generic actions as part of the manual action? Do you have an example of a ManualUpdate I could take a look at?23 replies