AshOban.Info (ash_oban v0.7.0)

View Source

Introspection for AshOban

Summary

Functions

The Domain to use when calling actions on this resource. Defaults to the resource's domain.

The Domain to use when calling actions on this resource. Defaults to the resource's domain.

A list of tenants or a function behaviour that returns a list of tenants a trigger should be run for. Can be overwritten on the trigger level.

A list of tenants or a function behaviour that returns a list of tenants a trigger should be run for. Can be overwritten on the trigger level.

oban.scheduled_actions DSL entities

If set to true, the ash_oban?: true flag will be placed in shared context instead of regular context. Shared context propagates to related actions called via manage_relationship and can be passed to other action invocations using the context as scope, making it easier to detect AshOban execution in nested actions. Can be overridden per trigger or scheduled action.

oban.triggers DSL entities

Default value for use_tenant_from_record? for all triggers in this resource. When set to true, tenants will be extracted from each record's tenant attribute and used when workers process those records. This allows schedulers to use multitenancy :allow_global read actions to find records across all tenants, while worker actions still run with the correct tenant context for each record.

Functions

oban_domain(dsl_or_extended)

@spec oban_domain(dsl_or_extended :: module() | map()) :: {:ok, module()} | :error

The Domain to use when calling actions on this resource. Defaults to the resource's domain.

oban_domain!(dsl_or_extended)

@spec oban_domain!(dsl_or_extended :: module() | map()) :: module() | no_return()

The Domain to use when calling actions on this resource. Defaults to the resource's domain.

oban_list_tenants(dsl_or_extended)

@spec oban_list_tenants(dsl_or_extended :: module() | map()) ::
  {:ok, [any()] | module() | tuple() | (-> any())} | :error

A list of tenants or a function behaviour that returns a list of tenants a trigger should be run for. Can be overwritten on the trigger level.

oban_list_tenants!(dsl_or_extended)

@spec oban_list_tenants!(dsl_or_extended :: module() | map()) ::
  ([any()] | module() | tuple() | (-> any())) | no_return()

A list of tenants or a function behaviour that returns a list of tenants a trigger should be run for. Can be overwritten on the trigger level.

oban_options(dsl_or_extended)

@spec oban_options(dsl_or_extended :: module() | map()) :: %{
  required(atom()) => any()
}

oban DSL options

Returns a map containing the and any configured or default values.

oban_scheduled_action(resource, name)

@spec oban_scheduled_action(Ash.Resource.t() | Spark.Dsl.t(), atom()) ::
  nil | AshOban.Schedule.t()

oban_scheduled_actions(dsl_or_extended)

@spec oban_scheduled_actions(dsl_or_extended :: module() | map()) :: [struct()]

oban.scheduled_actions DSL entities

oban_shared_context?(dsl_or_extended)

@spec oban_shared_context?(dsl_or_extended :: module() | map()) :: boolean()

If set to true, the ash_oban?: true flag will be placed in shared context instead of regular context. Shared context propagates to related actions called via manage_relationship and can be passed to other action invocations using the context as scope, making it easier to detect AshOban execution in nested actions. Can be overridden per trigger or scheduled action.

oban_trigger(resource, name)

@spec oban_trigger(Ash.Resource.t() | Spark.Dsl.t(), atom()) ::
  nil | AshOban.Trigger.t()

oban_triggers(dsl_or_extended)

@spec oban_triggers(dsl_or_extended :: module() | map()) :: [struct()]

oban.triggers DSL entities

oban_triggers_and_scheduled_actions(resource)

@spec oban_triggers_and_scheduled_actions(Ash.Resource.t() | Spark.Dsl.t()) :: [
  AshOban.Trigger.t() | AshOban.Schedule.t()
]

oban_use_tenant_from_record?(dsl_or_extended)

@spec oban_use_tenant_from_record?(dsl_or_extended :: module() | map()) :: boolean()

Default value for use_tenant_from_record? for all triggers in this resource. When set to true, tenants will be extracted from each record's tenant attribute and used when workers process those records. This allows schedulers to use multitenancy :allow_global read actions to find records across all tenants, while worker actions still run with the correct tenant context for each record.

Can be overridden per trigger.

pro?()

@spec pro?() :: boolean()