action {: #oban-triggers-trigger-action .spark-required} |
atom |
|
The action to be triggered. Defaults to the identifier of the resource plus the name of the trigger |
action_input {: #oban-triggers-trigger-action_input } |
map |
|
Static inputs to supply to the update/destroy action when it is called. Any metadata produced by read_metadata will overwrite these values. |
scheduler_queue {: #oban-triggers-trigger-scheduler_queue } |
atom |
|
The queue to place the scheduler job in. The same queue as job is used by default (but with a priority of 1 so schedulers run first). |
debug? {: #oban-triggers-trigger-debug? } |
boolean |
false |
If set to true , detailed debug logging will be enabled for this trigger. You can also set config :ash_oban, debug_all_triggers?: true to enable debug logging for all triggers. |
lock_for_update? {: #oban-triggers-trigger-lock_for_update? } |
boolean |
true |
If true , a transaction will be started before looking up the record, and it will be locked for update. Typically you should leave this on unless you have before/after/around transaction hooks. |
scheduler_cron {: #oban-triggers-trigger-scheduler_cron } |
String.t | false |
"* * * * *" |
A crontab configuration for when the job should run. Defaults to once per minute ("* * * * *"). Use false to disable the scheduler entirely. |
stream_batch_size {: #oban-triggers-trigger-stream_batch_size } |
pos_integer |
|
The batch size to pass when streaming records from using Ash.stream!/2 . No batch size is passed if none is provided here, so the default is used. |
queue {: #oban-triggers-trigger-queue } |
atom |
|
The queue to place the worker job in. The trigger name is used by default. |
record_limit {: #oban-triggers-trigger-record_limit } |
pos_integer |
|
If set, any given run of the scheduler will only ever schedule this many items maximum |
log_errors? {: #oban-triggers-trigger-log_errors? } |
boolean |
true |
Whether or not to log errors that occur when performing an action. |
log_final_error? {: #oban-triggers-trigger-log_final_error? } |
boolean |
true |
If true, logs that an error occurred on the final attempt to perform an action even if log_errors? is set to false. |
worker_priority {: #oban-triggers-trigger-worker_priority } |
non_neg_integer |
2 |
A number from 0 to 3, where 0 is the highest priority and 3 is the lowest. |
scheduler_priority {: #oban-triggers-trigger-scheduler_priority } |
non_neg_integer |
3 |
A number from 0 to 3, where 0 is the highest priority and 3 is the lowest. |
max_scheduler_attempts {: #oban-triggers-trigger-max_scheduler_attempts } |
pos_integer |
1 |
How many times to attempt scheduling of the triggered action. |
max_attempts {: #oban-triggers-trigger-max_attempts } |
pos_integer |
1 |
How many times to attempt the job. After all attempts have been exhausted, the scheduler may just reschedule it. Use the on_error action to update the record to make the scheduler no longer apply. |
read_metadata {: #oban-triggers-trigger-read_metadata } |
(any -> any) |
|
Takes a record, and returns metadata to be given to the update action as an argument called metadata . |
state {: #oban-triggers-trigger-state } |
:active | :paused | :deleted |
:active |
Describes the state of the cron job. See the getting started guide for more information. The most important thing is that you do not remove a trigger from a resource if you are using oban pro. |
read_action {: #oban-triggers-trigger-read_action } |
atom |
|
The read action to use when querying records. Defaults to the primary read. This action must support keyset pagination. |
worker_read_action {: #oban-triggers-trigger-worker_read_action } |
atom |
|
The read action to use when fetching the individual records for the trigger. Defaults to read_action . If you customize this, ensure your action handles scenarios where the trigger is no longer relevant. |
where {: #oban-triggers-trigger-where } |
any |
|
The filter expression to determine if something should be triggered |
on_error {: #oban-triggers-trigger-on_error } |
atom |
|
An update action to call after the last attempt has failed. See the getting started guide for more. |