-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: retrofit replay functionality in DHIS2-RapidPro solution wi… (
#198) * refactor: retrofit replay functionality in DHIS2-RapidPro solution with Camel HIE Refs: https://dhis2.atlassian.net/browse/INTEROP-37 * ci: force snapshot dependencies to be updated * fix: customise Camel HIE SQL for PostgreSQL refactor: remove SQL which is no longer needed thanks to Camel HIE * fix: remove bad casting * fix: correct SQL query --------- Co-authored-by: cjmamo <823038+claudemamo@users.noreply.github.com>
- Loading branch information
Showing
14 changed files
with
96 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -337,4 +337,4 @@ | |
</snapshots> | ||
</repository> | ||
</repositories> | ||
</project> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
report.success.log.insert.h2=INSERT INTO REPORT_SUCCESS_LOG (dhis_request, dhis_response, rapidpro_payload, data_set_code, report_period_offset, organisation_unit_id) VALUES (:?dhisRequest, :?dhisResponse, :?rapidProPayload, :?dataSetCode, :?reportPeriodOffset, :?orgUnitId) | ||
report.retry.dlc.select.h2=SELECT * FROM REPORT_DEAD_LETTER_CHANNEL WHERE status = 'RETRY' LIMIT 100 | ||
report.error.dlc.insert.h2=INSERT INTO REPORT_DEAD_LETTER_CHANNEL (payload, data_set_code, report_period_offset, organisation_unit_id, status, error_message) VALUES (:?payload, :?dataSetCode, :?reportPeriodOffset, :?orgUnitId, 'ERROR', :?errorMessage) | ||
report.processed.dlc.update.h2=UPDATE REPORT_DEAD_LETTER_CHANNEL SET status = 'PROCESSED', last_processed_at = CURRENT_TIMESTAMP WHERE id = :?id | ||
event.success.log.insert.h2=INSERT INTO EVENT_SUCCESS_LOG (dhis_request, dhis_response, rapidpro_payload, event_id) VALUES (:?dhisRequest, :?dhisResponse, :?rapidProPayload, :?eventId) | ||
event.retry.dlc.select.h2=SELECT * FROM EVENT_DEAD_LETTER_CHANNEL WHERE status = 'RETRY' LIMIT 100 | ||
event.error.dlc.insert.h2=INSERT INTO EVENT_DEAD_LETTER_CHANNEL (payload, event_id, status, error_message) VALUES (:?payload, :?eventId, 'ERROR', :?errorMessage) | ||
event.processed.dlc.update.h2=UPDATE EVENT_DEAD_LETTER_CHANNEL SET status = 'PROCESSED', last_processed_at = CURRENT_TIMESTAMP WHERE id = :?id | ||
last.run.select.h2=SELECT * FROM POLLER WHERE flow_uuid = :?flowUuid | ||
last.run.upsert.h2=MERGE INTO POLLER (flow_uuid, last_run_at) VALUES (:?flowUuid, :?newLastRunAt) | ||
|
||
report.success.log.insert.postgresql=INSERT INTO REPORT_SUCCESS_LOG (dhis_request, dhis_response, rapidpro_payload, data_set_code, report_period_offset, organisation_unit_id) VALUES (:?dhisRequest, :?dhisResponse, :?rapidProPayload, :?dataSetCode, :?reportPeriodOffset, :?orgUnitId) | ||
report.retry.dlc.select.postgresql=SELECT * FROM REPORT_DEAD_LETTER_CHANNEL WHERE status = 'RETRY' LIMIT 100 | ||
report.error.dlc.insert.postgresql=INSERT INTO REPORT_DEAD_LETTER_CHANNEL (payload, data_set_code, report_period_offset, organisation_unit_id, status, error_message) VALUES (:?payload, :?dataSetCode, :?reportPeriodOffset, :?orgUnitId, 'ERROR', :?errorMessage) | ||
report.processed.dlc.update.postgresql=UPDATE REPORT_DEAD_LETTER_CHANNEL SET status = 'PROCESSED', last_processed_at = CURRENT_TIMESTAMP WHERE id = :?id | ||
event.success.log.insert.postgresql=INSERT INTO EVENT_SUCCESS_LOG (dhis_request, dhis_response, rapidpro_payload, event_id) VALUES (:?dhisRequest, :?dhisResponse, :?rapidProPayload, :?eventId) | ||
event.retry.dlc.select.postgresql=SELECT * FROM EVENT_DEAD_LETTER_CHANNEL WHERE status = 'RETRY' LIMIT 100 | ||
event.error.dlc.insert.postgresql=INSERT INTO EVENT_DEAD_LETTER_CHANNEL (payload, event_id, status, error_message) VALUES (:?payload, :?event_id, 'ERROR', :?errorMessage) | ||
event.processed.dlc.update.postgresql=UPDATE EVENT_DEAD_LETTER_CHANNEL SET status = 'PROCESSED', last_processed_at = CURRENT_TIMESTAMP WHERE id = :?id | ||
last.run.select.postgresql=SELECT * FROM POLLER WHERE flow_uuid = :?flowUuid | ||
last.run.upsert.postgresql=INSERT INTO POLLER (flow_uuid, last_run_at) VALUES (:?flowUuid, :?newLastRunAt) ON CONFLICT (flow_uuid) DO UPDATE SET last_run_at = :?newLastRunAt | ||
|
||
message.store.insert.postgresql=INSERT INTO MESSAGE_STORE (key_, headers, body, context) VALUES (:?key, :?headers, :?body, :?context) | ||
message.store.select.postgresql=SELECT * FROM MESSAGE_STORE WHERE key_ LIKE :?key | ||
message.store.select.range.postgresql=SELECT * FROM MESSAGE_STORE WHERE key_ LIKE :?key OFFSET :?offset ROWS FETCH FIRST :?limit ROWS ONLY | ||
message.store.delete.postgresql=DELETE FROM MESSAGE_STORE WHERE key_ LIKE :?key RETURNING * | ||
message.store.move.postgresql=WITH OLD AS (SELECT * FROM MESSAGE_STORE WHERE key_ = :?oldKey) UPDATE MESSAGE_STORE SET key_ = :?newKey WHERE key_ = :?oldKey RETURNING *, (SELECT key_ FROM OLD); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.