pub struct EnqueueOptions {
pub max_retries: u32,
pub labels: HashMap<String, String>,
pub scheduled_at: Option<DateTime<Utc>>,
pub max_cost_usd: Option<Decimal>,
pub created_by: Option<RunActor>,
pub idempotency_key: Option<String>,
}Expand description
Optional settings for Engine::enqueue_handler_with_options.
All fields fall back to handler or server defaults when left at their
Default value.
§Examples
use ironflow_engine::engine::EnqueueOptions;
use rust_decimal::Decimal;
let options = EnqueueOptions {
max_retries: 3,
max_cost_usd: Some(Decimal::new(50, 2)),
..Default::default()
};
assert_eq!(options.max_retries, 3);Fields§
§max_retries: u32Number of automatic retries granted to the run.
labels: HashMap<String, String>Labels merged on top of the handler’s default labels.
scheduled_at: Option<DateTime<Utc>>Defer execution until this instant instead of running as soon as a worker picks the run up.
max_cost_usd: Option<Decimal>Cost cap for the run. Overrides both the handler default and the server
default. None falls back to
BudgetConfig::resolve_run_cap.
created_by: Option<RunActor>Authenticated principal that triggered the run. None for cron,
webhook, and programmatic triggers.
idempotency_key: Option<String>Idempotency key binding this enqueue to a single run.
When set and already bound to a run created within
IDEMPOTENCY_WINDOW,
nothing is enqueued and the original run is replayed.
Trait Implementations§
Source§impl Clone for EnqueueOptions
impl Clone for EnqueueOptions
Source§fn clone(&self) -> EnqueueOptions
fn clone(&self) -> EnqueueOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnqueueOptions
impl Debug for EnqueueOptions
Source§impl Default for EnqueueOptions
impl Default for EnqueueOptions
Source§fn default() -> EnqueueOptions
fn default() -> EnqueueOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EnqueueOptions
impl RefUnwindSafe for EnqueueOptions
impl Send for EnqueueOptions
impl Sync for EnqueueOptions
impl Unpin for EnqueueOptions
impl UnsafeUnpin for EnqueueOptions
impl UnwindSafe for EnqueueOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more