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

feat: async #1

Merged
merged 26 commits into from
Aug 13, 2022
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5173aca
把流量统计封装到send和recv中,下一步打算把send,recv改成asyncio版本试试
JaysonAlbert Nov 7, 2017
be8935d
Merge branch 'master' of https://github.com/rainx/pytdx
JaysonAlbert Nov 7, 2017
d415066
修复统计信息bug
JaysonAlbert Nov 7, 2017
ab5b7a1
send, recv bug
JaysonAlbert Nov 7, 2017
51fa319
Merge pull request #97 from JaysonAlbert/master
rainx Nov 8, 2017
f4a4e94
add reflect version to asynclize
rainx Nov 8, 2017
b4068ac
add reflaction interface
rainx Nov 8, 2017
43cdd94
remove useless ref
rainx Nov 8, 2017
54b087c
add connection pool for async, and fix bugs.
JaysonAlbert Jan 2, 2018
583f241
Merge pull request #123 from JaysonAlbert/async
rainx Jan 2, 2018
209a103
change asyncio.coroutine to async def
JaysonAlbert Jan 2, 2018
a826fb6
limit connection numbers, asyncio.sleep(0.1)
JaysonAlbert Jan 3, 2018
26e362c
Merge pull request #124 from JaysonAlbert/async
rainx Jan 4, 2018
645167f
setattr of object instead of class
JaysonAlbert Jan 5, 2018
008b5f1
Merge pull request #128 from JaysonAlbert/async
rainx Jan 5, 2018
e17e6b5
bugfix: get_event_loop() --> new_event_loop()
JaysonAlbert Jan 5, 2018
f82e2d0
Merge pull request #129 from JaysonAlbert/async
rainx Jan 8, 2018
2dde062
使用thread executor代理parseResponse
JaysonAlbert Jan 8, 2018
e95e5d6
Merge pull request #130 from JaysonAlbert/async
rainx Jan 9, 2018
71cdb1d
修复网络不稳定问题
JaysonAlbert Jan 18, 2018
7a809ec
减少内存开销
JaysonAlbert Jan 18, 2018
0f287b0
Merge branch 'master' into async
JaysonAlbert Jan 20, 2018
5984602
Merge pull request #140 from JaysonAlbert/async
rainx Jan 22, 2018
bd242b0
Merge branch 'master' into async
rainx Jan 22, 2018
7d59d9b
add utf-8 declare
rainx Jan 22, 2018
d63759a
Merge branch 'master' into async
rainx Jan 22, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
setattr of object instead of class
  • Loading branch information
JaysonAlbert committed Jan 5, 2018
commit 645167ffc079cf1168ff39c6f806bc566055f585
9 changes: 6 additions & 3 deletions pytdx/async/reflection.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding: utf-8

import six
from functools import partial

if six.PY2:
raise NotImplementedError("I am only working for Python3")
Expand Down Expand Up @@ -69,10 +70,12 @@ async def _call_api(self):

return self.parseResponse(body_buf)

setattr(parser, "call_api", call_api)
setattr(parser, "_call_api", _call_api)
cmd = parser(None, None)

return parser(None, None)
setattr(cmd, "call_api", partial(call_api,cmd))
setattr(cmd, "_call_api", partial(_call_api, cmd))

return cmd


if __name__ == '__main__':
Expand Down