Skip to content

Commit

Permalink
feat: switch retry to one minute
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Hivert <[email protected]>
  • Loading branch information
ghivert committed May 14, 2024
1 parent 2b3b125 commit 3876e09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/backend/src/retrier.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type State(a) {
)
}

pub const five_minutes: Int = 300_000
pub const one_minute: Int = 60_000

fn enqueue_next_rerun(state: State(a)) {
let assert iterator.Next(cooldown, acc) = iterator.step(state.random_ints)
Expand All @@ -33,7 +33,7 @@ fn enqueue_next_rerun(state: State(a)) {
pub fn retry(
do work: fn(Int) -> Result(a, Error),
) -> Result(Subject(Message), actor.StartError) {
fn() { init(five_minutes, work) }
fn() { init(one_minute, work) }
|> actor.Spec(loop: loop, init_timeout: 100)
|> actor.start_spec()
}
Expand Down

0 comments on commit 3876e09

Please sign in to comment.