Open
Conversation
ppedziwiatr
requested changes
Jan 11, 2022
src/db/schema.ts
Outdated
| table.bigInteger("block_height").notNullable().index(); | ||
| table.string("block_id").notNullable(); | ||
| table.string("timestamp").index(); | ||
| table.jsonb("tags"); |
Contributor
There was a problem hiding this comment.
shouldn't tags be a separate table? I believe it could simplify future queries (I know that postgres has cool support for json, but still..)
Contributor
There was a problem hiding this comment.
also, table should be named stats_contracts - and if we decide to move the tags to a separate one - stats_tags
src/gateway/tasks/stats.ts
Outdated
|
|
||
| const currentNetworkHeight = results[1].value.height; | ||
|
|
||
| const lastProcessedBlockHeight = results[0].value?.block_height || 472808; |
Contributor
There was a problem hiding this comment.
472808 deserves its own constant ;-) to be used in syncTask
src/gateway/tasks/stats.ts
Outdated
|
|
||
| } | ||
|
|
||
| async function loadPages( |
Contributor
There was a problem hiding this comment.
maybe we should refactor this to some common function, that would be also used in the sync interactions task?
src/gateway/tasks/stats.ts
Outdated
| ar | ||
| } | ||
| data { | ||
| size |
Contributor
There was a problem hiding this comment.
size doesn't seem to be stored in the db...
1b3078a to
d402442
Compare
d402442 to
4a30319
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.