This commit is contained in:
vladislav 2026-09-05 23:45:27 -04:00
parent c2d509dcfa
commit 6a2b76c228
Signed by: Vladislav
GPG Key ID: D97C9E5E4860EE45
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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':[]}]