这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ZIMkaRU
Copy link
Member

@ZIMkaRU ZIMkaRU commented Jul 28, 2022

This PR adds the ability to send events by WS to notify users when fetching data from bfx_api_v2 is paused due broken internet connection. Available two WS events:

  • emitENetError when connection is broken, response example:
{
  "jsonrpc": "2.0",
  "result": "DATA_SYNCER",
  "id": null,
  "action": "emitENetError"
}
  • emitENetResumed when connection is resumed, response example:
{
  "jsonrpc": "2.0",
  "result": "DATA_SYNCER",
  "id": null,
  "action": "emitENetResumed"
}

In those two events available the following results, that return caller name:

  • DATA_SYNCER - appears when data syncs from api_v2 to DB
  • CSV_WRITER - appears when CSV file generates from api_v2
  • ACTIVE_POSITIONS_GETTER - appears when UI fetches active positions data from api_v2 for sub-account
  • POSITIONS_AUDIT_GETTER - appears when UI fetches positions audit data from api_v2 for sub-account

Depends on this PR:

Copy link
Contributor

@ezewer ezewer 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 to me!

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.

3 participants