Skip to content

Commit

Permalink
update to 1.5.5 极大优化了在5w以上个账户时 QAUser的加载速度
Browse files Browse the repository at this point in the history
update to 1.5.5 极大优化了在5w以上个账户时 QAUser的加载速度
  • Loading branch information
yutiansut authored Jul 24, 2019
2 parents 2bab42d + 1f08362 commit cf35993
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions QUANTAXIS/QAARP/QAUser.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def get_portfolio(self, portfolio_cookie: str):
'''
# return self.portfolio_list[portfolio]
# fix here use cookie as key to find value in dict
return QA.QA_Portfolio(user_cookie=self.user_cookie, portfolio_cookie= portfolio_cookie)
return QA_Portfolio(user_cookie=self.user_cookie, portfolio_cookie= portfolio_cookie)

def generate_simpleaccount(self):
"""make a simple account with a easier way
Expand Down Expand Up @@ -560,15 +560,15 @@ def reload(self, message):
self.password = message.get('password')
self.user_cookie = message.get('user_cookie')
#
self.portfolio_list = [
self.portfolio_list = list(set([
item['portfolio_cookie'] for item in DATABASE.portfolio.find(
{'user_cookie': self.user_cookie},
{
'portfolio_cookie': 1,
'_id': 0
}
)
]
]))

# portfolio_list = message.get('portfolio_list')
# if len(portfolio_list) > 0:
Expand Down
2 changes: 1 addition & 1 deletion QUANTAXIS/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
2017/4/8
"""

__version__ = '1.5.4'
__version__ = '1.5.5'
__author__ = 'yutiansut'

import argparse
Expand Down

0 comments on commit cf35993

Please sign in to comment.