Ricochet-Exchange / ricochet-keeper

Keeper for Ricochet Protocol, implemented with Apache Airflow
5 stars 10 forks source link

Move all constants to dedicated class. #29

Closed nikramakrishnan closed 2 years ago

nikramakrishnan commented 2 years ago

fixes #23

nikramakrishnan commented 2 years ago

@mikeghen ready to review 🎉

shreyaspapi commented 2 years ago

Tested the distribute , tellor dag working fine.

mikeghen commented 2 years ago

@nikramakrishnan @shreyaspapi sorry this took so long to get to, this looks good, how can someone customize these variables, do they add an airflow variable for it?

shreyaspapi commented 2 years ago

@nikramakrishnan @shreyaspapi sorry this took so long to get to, this looks good, how can someone customize these variables, do they add an airflow variable for it?

Oh no I think you got this PR wrong, the reason for this PR was to have all default value contents in one place. here - dags/constants/constants.py, Like the one we have for distribute-schedule.

So instead of writing -

SCHEDULE_INTERVAL = Variable.get("distribution-schedule-interval", "0 * * * *")

or

gas_multiplier=1.1

we can -

SCHEDULE_INTERVAL = Variable.get("distribution-schedule-interval", ScheduleConstants.RICOCHET_DISTRIBUTE)

or

gas_multiplier=PriceConstants.GAS_MULTIPLIER_DEFAULT

and easily change the default values from dags/constants/constants.py

mikeghen commented 2 years ago

@shreyaspapi @nikramakrishnan, you can update the merge conflicts and then this can be merged