-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrest_test.py
51 lines (38 loc) · 1.01 KB
/
rest_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
Rest Test
"""
import asyncio
from protocols.connection.coin_rest_api import (
KoreaExchangeRestAPI,
AsiaxchangeRestAPI,
NEExchangeRestAPI,
)
async def f_btc_present_start() -> None:
"""
bitcoin kafak stream
"""
await AsiaxchangeRestAPI().total_pull_request("BTC")
async def k_btc_present_start() -> None:
"""
ethereum kafak stream
"""
await KoreaExchangeRestAPI().total_pull_request("BTC")
async def n_btc_present_start() -> None:
"""
ethereum kafak stream
"""
await NEExchangeRestAPI().total_pull_request("BTC")
async def be_present_gether() -> None:
"""
kafka async stream
"""
tasks = [
asyncio.create_task(f_btc_present_start()),
asyncio.create_task(k_btc_present_start()),
asyncio.create_task(n_btc_present_start()),
]
await asyncio.gather(*tasks, return_exceptions=False)
async def data_sending_start() -> None:
await be_present_gether()
if __name__ == "__main__":
asyncio.run(be_present_gether())