This commit is contained in:
parent
ebdfdb2613
commit
7f203bf900
|
@ -16,10 +16,9 @@ starlette = "^0.36.1"
|
||||||
gql = "^3.4.1"
|
gql = "^3.4.1"
|
||||||
ariadne = "^0.21"
|
ariadne = "^0.21"
|
||||||
aiohttp = "^3.9.1"
|
aiohttp = "^3.9.1"
|
||||||
google-oauth2-tool = "^0.0.3"
|
|
||||||
google-api-python-client = "^2.114.0"
|
|
||||||
pre-commit = "^3.6.0"
|
pre-commit = "^3.6.0"
|
||||||
granian = "^1.0.1"
|
granian = "^1.0.1"
|
||||||
|
google-analytics-data = "^0.18.3"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
setuptools = "^69.0.2"
|
setuptools = "^69.0.2"
|
||||||
|
|
|
@ -36,7 +36,7 @@ class ViewedStorage:
|
||||||
analytics_client: BetaAnalyticsDataClient | None = None
|
analytics_client: BetaAnalyticsDataClient | None = None
|
||||||
auth_result = None
|
auth_result = None
|
||||||
disabled = False
|
disabled = False
|
||||||
updated = int(time.time())
|
start_date = int(time.time())
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def init():
|
async def init():
|
||||||
|
@ -55,7 +55,8 @@ class ViewedStorage:
|
||||||
self.load_precounted_views()
|
self.load_precounted_views()
|
||||||
|
|
||||||
if os.path.exists(VIEWS_FILEPATH):
|
if os.path.exists(VIEWS_FILEPATH):
|
||||||
self.updated = os.path.getctime(VIEWS_FILEPATH)
|
file_timestamp = os.path.getctime(VIEWS_FILEPATH)
|
||||||
|
self.start_date = datetime.fromtimestamp(file_timestamp).strftime('%Y-%m-%d')
|
||||||
|
|
||||||
# Запуск фоновой задачи
|
# Запуск фоновой задачи
|
||||||
asyncio.create_task(self.worker())
|
asyncio.create_task(self.worker())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user