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

[ECO-2086] Add last_transaction_timestamp to data_status endpoint #796

Merged
merged 3 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 3 additions & 1 deletion doc/doc-site/docs/off-chain/dss/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ Stable DSS builds are tracked on the [`dss-stable`] branch with tags like [`dss-
1. Merge `main` into `dss-stable`.
1. Push annotated tag to head of `dss-stable`.

## [v2.4.0-rc.1][dss-v2.4.0-rc.1] (in progress)
## [v2.4.0-rc.2][dss-v2.4.0-rc.2] (in progress)

### Added

- Transaction version field inside levels MQTT events ([#792]).
- Timestamp of last processed transaction in `/data_status` endpoint ([#796]).

### Fixed

Expand Down Expand Up @@ -290,6 +291,7 @@ Stable DSS builds are tracked on the [`dss-stable`] branch with tags like [`dss-
[#788]: https://github.com/econia-labs/econia/pull/788
[#792]: https://github.com/econia-labs/econia/pull/792
[#793]: https://github.com/econia-labs/econia/pull/793
[#796]: https://github.com/econia-labs/econia/pull/796
[docs site readme]: https://github.com/econia-labs/econia/blob/main/doc/doc-site/README.md
[dss-v2.1.0-rc.1]: https://github.com/econia-labs/econia/releases/tag/dss-v2.1.0-rc.1
[dss-v2.2.1-rc.1]: https://github.com/econia-labs/econia/releases/tag/dss-v2.2.1-rc.1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- This file should undo anything in `up.sql`
DROP VIEW api.data_status;

CREATE VIEW api.data_status AS
SELECT
CURRENT_TIMESTAMP AS current_time,
processor_status.last_success_version AS processor_last_txn_version_processed,
user_history_last_indexed_txn.txn_version AS aggregator_user_history_last_txn_version_processed,
array_agg(ARRAY[resolution, candlesticks_last_indexed_txn.txn_version]) AS aggregator_candlesticks_last_txn_version_processed
FROM
processor_status,
aggregator.user_history_last_indexed_txn,
aggregator.candlesticks_last_indexed_txn
WHERE
processor_status.processor = 'econia_processor'
GROUP BY
user_history_last_indexed_txn.txn_version,
processor_status.last_success_version;


GRANT
SELECT
ON api.data_status TO web_anon;
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- Your SQL goes here
DROP VIEW api.data_status;

CREATE VIEW api.data_status AS
SELECT
CURRENT_TIMESTAMP AS current_time,
processor_status.last_transaction_timestamp,
processor_status.last_success_version AS processor_last_txn_version_processed,
user_history_last_indexed_txn.txn_version AS aggregator_user_history_last_txn_version_processed,
array_agg(ARRAY[resolution, candlesticks_last_indexed_txn.txn_version]) AS aggregator_candlesticks_last_txn_version_processed
FROM
processor_status,
aggregator.user_history_last_indexed_txn,
aggregator.candlesticks_last_indexed_txn
WHERE
processor_status.processor = 'econia_processor'
GROUP BY
user_history_last_indexed_txn.txn_version,
processor_status.last_success_version,
processor_status.last_transaction_timestamp;


GRANT
SELECT
ON api.data_status TO web_anon;
Loading