mirror of
https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git
synced 2025-06-16 15:06:53 +00:00
cache trending command results
This commit is contained in:
parent
e5013d8c69
commit
553b958cc1
@ -5,4 +5,5 @@ fuzzywuzzy==0.18.0
|
|||||||
python-Levenshtein==0.12.1
|
python-Levenshtein==0.12.1
|
||||||
schedule==1.0.0
|
schedule==1.0.0
|
||||||
mplfinance==0.12.7a5
|
mplfinance==0.12.7a5
|
||||||
markdownify==0.6.5
|
markdownify==0.6.5
|
||||||
|
cachetools==4.2.2
|
@ -8,6 +8,7 @@ from logging import critical, debug, error, info, warning
|
|||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import schedule
|
import schedule
|
||||||
|
from cachetools import TTLCache, cached
|
||||||
from fuzzywuzzy import fuzz
|
from fuzzywuzzy import fuzz
|
||||||
|
|
||||||
from cg_Crypto import cg_Crypto
|
from cg_Crypto import cg_Crypto
|
||||||
@ -399,6 +400,7 @@ class Router:
|
|||||||
|
|
||||||
return replies
|
return replies
|
||||||
|
|
||||||
|
@cached(cache=TTLCache(maxsize=1024, ttl=600))
|
||||||
def trending(self) -> str:
|
def trending(self) -> str:
|
||||||
"""Checks APIs for trending symbols.
|
"""Checks APIs for trending symbols.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user