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

Handle order events #20

Merged
merged 5 commits into from
Mar 14, 2024
Merged

Handle order events #20

merged 5 commits into from
Mar 14, 2024

Conversation

oysval
Copy link
Contributor

@oysval oysval commented Feb 9, 2024

Har lagt til støtte for order-events fra Kafka. Dersom vi får inn en order-event av typen OrderConfirmed, publiseres denne på GCP Pub/Sub.

@oysval oysval requested a review from a team as a code owner February 9, 2024 08:38

export default {
async compress(encoder: { buffer: Buffer }) {
return lz4.encode(encoder.buffer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kanskje vi kan få noen til å skru på lz4 i f.eks dev og se om dette funker? Sånn for sikkerhetsskyld. Men ikke kritisk for å merge

import { removeEventNameLevelFromEvent } from './utils.js'

const isForSelfService = (eventContents: any): boolean => {
const pos = eventContents.meta?.pos
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hvis dette er en fast plassering for pos så kan vi kanskje trekke det ut i utils (siden tilnærmet samme kode finnes i paymentEventHandler)?

return
}

const eventContents = removeEventNameLevelFromEvent(event)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regner med at du har sjekket om denne er nødvendig?

@oysval oysval merged commit bb61de9 into master Mar 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants