Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
remove optional env vars from critical path (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
fleupold authored Jul 15, 2024
1 parent d3b054d commit a54f468
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ def __init__(self) -> None:

if __name__ == "__main__":
load_dotenv()
volume_path = Path(os.environ["VOLUME_PATH"])
args = ScriptArgs()
aws = AWSClient.new_from_environment()
dune = DuneClient(os.environ["DUNE_API_KEY"])
orderbook = OrderbookFetcher()

Expand All @@ -65,13 +63,17 @@ def __init__(self) -> None:
)
)
elif args.sync_table == SyncTable.ORDER_REWARDS:
aws = AWSClient.new_from_environment()
volume_path = Path(os.environ["VOLUME_PATH"])
sync_order_rewards(
aws,
config=SyncConfig(volume_path),
fetcher=orderbook,
dry_run=args.dry_run,
)
elif args.sync_table == SyncTable.BATCH_REWARDS:
aws = AWSClient.new_from_environment()
volume_path = Path(os.environ["VOLUME_PATH"])
sync_batch_rewards(
aws,
config=SyncConfig(volume_path),
Expand Down

0 comments on commit a54f468

Please sign in to comment.