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

#149 - [trader] make logging informative and more succinct #154

Merged

Conversation

trizin
Copy link
Contributor

@trizin trizin commented Sep 8, 2023

Fixes #149

Changes proposed in this PR:

  • Make logging informative and more succinct

Logs (ran against testnet):

python3 pdr_backend/trader/main.py
Getting feed for 0x8db30338c5f09381cd2644bf7b4b8ea578e248a9

--------------------------------------------------------------------------------
Config:
TraderConfig={private_key=0xhi, rpc_url=https://testnet.sapphire.oasis.dev, subgraph_url=https://v4.subgraph.sapphire-testnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph, trader_min_buffer=60, owner_addresses=[], pair_filters=['XRP/USDT'], source_filter=[], timeframe_filter=[], web3_config=<pdr_backend.util.web3_config.Web3Config object at 0x7f7ee551b6a0> /TraderConfig}
----------------------------------------   Processing [Feed 0x8db30 XRP/USDT|binance|5m]  ---------------------------------------- 
Epoch 5647241
Seconds remaining in epoch: 255
      [Feed 0x8db30 XRP/USDT|binance|5m] has a new prediction: 0.0 / 0.01.
----------------------------------------   Processing [Feed 0x8db30 XRP/USDT|binance|5m]  ---------------------------------------- 
Epoch 5647241
Seconds remaining in epoch: 249
      Done feed: already traded this epoch
----------------------------------------   Processing [Feed 0x8db30 XRP/USDT|binance|5m]  ---------------------------------------- 
Epoch 5647241
Seconds remaining in epoch: 244
      Done feed: already traded this epoch

@trizin trizin linked an issue Sep 8, 2023 that may be closed by this pull request
2 tasks
@trizin trizin requested a review from trentmc September 8, 2023 11:28
@trizin trizin self-assigned this Sep 8, 2023
Copy link
Member

@trentmc trentmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One small thing to add. Once you've done that, go ahead and merge

pdr_backend/trader/trader_agent.py Show resolved Hide resolved
@trizin trizin merged commit c2333a4 into main Sep 8, 2023
5 checks passed
@trizin trizin deleted the issue149-trader-make-logging-informative-and-more-succinct branch September 8, 2023 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[trader] Make logging informative *and* more succinct
2 participants