Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(PostProcessing) - Add source field to kafka event to eliminate double processing #2879

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/services/events/create_batch_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def produce_kafka_event(event)
code: event.code,
properties: event.properties,
ingested_at: Time.zone.now.iso8601[...-1],
precise_total_amount_cents: event.precise_total_amount_cents.present? ? event.precise_total_amount_cents.to_s : "0.0"
precise_total_amount_cents: event.precise_total_amount_cents.present? ? event.precise_total_amount_cents.to_s : "0.0",
source: 'http_ruby'
}.to_json
)
end
Expand Down
3 changes: 2 additions & 1 deletion app/services/events/create_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def produce_kafka_event(event)
# NOTE: Default value to 0.0 is required for clickhouse parsing
precise_total_amount_cents: event.precise_total_amount_cents.present? ? event.precise_total_amount_cents.to_s : "0.0",
properties: event.properties,
ingested_at: Time.zone.now.iso8601[...-1]
ingested_at: Time.zone.now.iso8601[...-1],
source: 'http_ruby'
}.to_json
)
end
Expand Down