mirror of
https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git
synced 2025-07-23 14:41:26 +00:00
cache trending command results
This commit is contained in:
@@ -8,6 +8,7 @@ from logging import critical, debug, error, info, warning
|
||||
|
||||
import pandas as pd
|
||||
import schedule
|
||||
from cachetools import TTLCache, cached
|
||||
from fuzzywuzzy import fuzz
|
||||
|
||||
from cg_Crypto import cg_Crypto
|
||||
@@ -399,6 +400,7 @@ class Router:
|
||||
|
||||
return replies
|
||||
|
||||
@cached(cache=TTLCache(maxsize=1024, ttl=600))
|
||||
def trending(self) -> str:
|
||||
"""Checks APIs for trending symbols.
|
||||
|
||||
|
Reference in New Issue
Block a user