-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: Automated CB based on timestamps, Cron and DB part #246
Conversation
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.
Looks great!
newFades = getFillersNewFades(FADES_ROWS, ADDRESS_TO_FILLER, FILLER_TIMESTAMPS, logger); | ||
}); | ||
|
||
describe('getFillersNewFades', () => { | ||
it('takes into account multiple filler addresses of the same filler', () => { |
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.
this test name seems outdated?
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.
nice nice, this lgtm! just for a thought experiment, if we wanted to create a reset button it could just write to the filler row and set the blockUntilTimestamp
to nothing right?
that's right, although I think the main goal of the design is to fully automate things |
@@ -56,14 +58,15 @@ export class FadesRepository extends BaseRedshiftRepository { | |||
} | |||
|
|||
const CREATE_VIEW_SQL = ` | |||
CREATE OR REPLACE VIEW rfqOrdersTimestamp | |||
CREATE OR REPLACE VIEW latestRfqs |
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.
This gets the latest 20 RFQs for each filler right? The limit of 1k would prevent us from going over 50 fillers. Is this 50 filler limit expected for the foreseeable future?
creates a
Timestamp
Dynamo table that tracks filler hash, lastCheckedPostTimestamp (last time the row is updated), and the timestamp that each filler should be blocked until.The fade-rate cron job now calculates related timestamps based on recent order data from Redshift and
Timestamp
table