Skip to content

Commit

Permalink
fix: need to release a new version, didn't like how this was worded (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverb123 authored Aug 6, 2024
1 parent 381d4b8 commit 751ac44
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions rust/hook-worker/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,23 +266,17 @@ async fn process_batch<'a>(

let results = join_all(futures).await;

if hog_mode {
// System relevant - this means that our requests are at-least once, since if we do the
// request, it succeeds, and then our kafka is down, we'll do the request again. This was
// already true on batch commit, but now it's true on kafka send as well. We could add a
// "returned" state to the state machine that indicates "we made the request but haven't
// pushed it to kafka yet", but we need to decide that's something we care about first.
if (push_hoghook_results_to_kafka(
if hog_mode
&& push_hoghook_results_to_kafka(
results,
metadata_vec,
kafka_producer,
cdp_function_callbacks_topic,
)
.await)
.is_err()
{
return;
}
.await
.is_err()
{
return;
}

let _ = batch.commit().await.map_err(|e| {
Expand Down

0 comments on commit 751ac44

Please sign in to comment.