From 6a2b76c228bdd78be5eb3ba487a5ce8152ff495528a73f03902b6a741553491f Mon Sep 17 00:00:00 2001 From: vladislav Date: Sat, 5 Sep 2026 23:45:27 -0400 Subject: [PATCH] fix --- main.ipynb | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.ipynb b/main.ipynb index c546518..ad328d4 100644 --- a/main.ipynb +++ b/main.ipynb @@ -480,7 +480,7 @@ "outputs": [], "source": [ "@app.get(\"/cron/08\", response_model=dict)\n", - "async def cron_08():\n", + "async def cron_08(background_tasks: BackgroundTasks):\n", " async for doc in posts_collection.find({\n", " '_id': {'$gte': ObjectId.from_datetime(datetime.now() - timedelta(days=1))},\n", " '$or':[{'vk':[]},{'tg':[]},{'fb':[]},{'inst':[]},{'max':[]}]\n", diff --git a/main.py b/main.py index b75fb5e..cd32f21 100644 --- a/main.py +++ b/main.py @@ -303,7 +303,7 @@ async def posts_temp(user,request): ) @app.get("/cron/08", response_model=dict) -async def cron_08(): +async def cron_08(background_tasks: BackgroundTasks): async for doc in posts_collection.find({ '_id': {'$gte': ObjectId.from_datetime(datetime.now() - timedelta(days=1))}, '$or':[{'vk':[]},{'tg':[]},{'fb':[]},{'inst':[]},{'max':[]}]