-
Notifications
You must be signed in to change notification settings - Fork 8
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
[MODAUD-195]. Implement consumer & endpoint for invoice records #175
Conversation
new DeploymentOptions() | ||
.setWorker(true) | ||
.setInstances(acqPieceConsumerInstancesNumber), pieceEventsConsumer); | ||
deployVerticle(vertx, verticleFactory, OrderEventConsumersVerticle.class, acqOrderConsumerInstancesNumber, acqOrderConsumerPoolSize, orderEventsConsumer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to what we did in mod-orders-storage:
mod-audit-server/src/main/java/org/folio/dao/acquisition/impl/InvoiceEventsDaoImpl.java
Outdated
Show resolved
Hide resolved
String query = format(GET_BY_INVOICE_ID_SQL, logTable, logTable, format(ORDER_BY_PATTERN, sortBy, sortInvoice)); | ||
Tuple queryParams = Tuple.of(UUID.fromString(invoiceId), limit, offset); | ||
pgClientFactory.createInstance(tenantId).selectRead(query, queryParams, promise); | ||
} catch (Exception e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
catch is not needed here, in case of failures we will have failed future.
Potentailly it can be a chance of runtime excpeptions even before creating futures, but it is very low I think. And if there is for example some DB failure - this catch will not help and if you want to log - .onFailure can be used
mod-audit-server/src/main/java/org/folio/dao/acquisition/impl/InvoiceEventsDaoImpl.java
Outdated
Show resolved
Hide resolved
mod-audit-server/src/main/resources/templates/db_scripts/schema.json
Outdated
Show resolved
Hide resolved
mod-audit-server/src/test/java/org/folio/dao/InvoiceEventsDaoTest.java
Outdated
Show resolved
Hide resolved
mod-audit-server/src/main/java/org/folio/dao/acquisition/impl/InvoiceEventsDaoImpl.java
Outdated
Show resolved
Hide resolved
mod-audit-server/src/main/java/org/folio/dao/acquisition/impl/InvoiceEventsDaoImpl.java
Outdated
Show resolved
Hide resolved
ramls/invoice_audit_event.json
Outdated
"javaType": "java.lang.Object" | ||
} | ||
}, | ||
"additionalProperties": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this even structure changes in the futures, this dto also have to changes because of "additionalProperties": false.
this field don't allow extra property in event. default true (if additionalProperties is not exists)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this even structure changes in the futures, this dto also have to changes because of "additionalProperties": false. this field don't allow extra property in event. default true (if additionalProperties is not exists)
So you recommend to set it to true
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Quality Gate passedIssues Measures |
Purpose
Approach