Skip to content

Commit

Permalink
Merge pull request #7 from NFIBrokerage/wrap-auto-sub-fun
Browse files Browse the repository at this point in the history
Use wrap_function
  • Loading branch information
mpran authored May 5, 2022
2 parents 30bee26 + 662f068 commit e86b17f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
-->

## 0.3.1 - 2022-05-05

### Fixed

- Use `wrap_function` to properly evaluate `auto_subscribe` value

## 0.3.0 - 2022-04-14

### Added
Expand Down
4 changes: 2 additions & 2 deletions lib/beeline/health_checker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ defmodule Beeline.HealthChecker do
interval_fn: wrap_function(config.health_check_interval),
drift_fn: wrap_function(config.health_check_drift),
hostname: hostname(),
auto_subscribe?: config.auto_subscribe?.(producer.name)
auto_subscribe?: wrap_function(config.auto_subscribe?, producer.name)
}
|> schedule_next_poll()

Expand Down Expand Up @@ -128,7 +128,7 @@ defmodule Beeline.HealthChecker do
drift: state.drift,
measurement_time: DateTime.utc_now(),
prior_position: state.current_position,
auto_subscribe: state.auto_subscribe?
auto_subscribe: state.auto_subscribe?.()
}

:telemetry.span(
Expand Down

0 comments on commit e86b17f

Please sign in to comment.